if the text is not too much, you can make the letters in to sprites, one letter one sprite. and add sprite on top of your map sprite by dynamic component extension.
Another question - what device type is your App going to run on?
So, not really sure what you need but here is an example of how you might get to what you need.
SpriteMap.aia (19.4 KB)
Thanks for your help, but the problem is nothing but onclick event. How can i know which province is clicked.
As Steve mentioned, I'm trying to make risk-like game. And Android.
That's great idea. As i'm using only numbers, i will only need 10 different images.
With a little bit of ingenuity you could do this by polling the province color.
Really
What you do depends on how you build or display your province polygons. If you use sprites, you may have an overlap issue as the sprite is always a rectangle, even if it has transparent parts.
Good luck. Seems a fun Project.
That is what Tim said. But as the province colors will change, I can't use this option. I tried to make it with 2 canvases. Default colors will be in first canvas, and coords I clicked in second canvas will request pixelcolor to first canvas. I set first canvas invisible but it always shows rgba(255,255,255,0)
Are you unable to keep track of the province colour changes ? You have 16.7 million colours to play with....
Captured provinces change their color to the captured one. So if I click on red, how can i know which province it is?
Which one is Red ?
255,0,0 / 255,0,1 / 255,0,2
Understood, I will try, thanks.
Here an extension to change color.