Hi All, I need help please, I am happy how my project has shaped up with Xojo so far, but there is the challenge, I am no software expert so may be you experts have some real solution. My project displays city maps with borders around suburbs, I want ability for user to select a suburb on map (this should highlight suburb - colour coded, not the complete map), then user need to tag it based on different scenarios, these scenarios would reflect as symbols on the selected portion.
I don’t know if xojo is capable of doing this? any plugins i need or is it something that needs extensive coding, i am okay with learning but i could not find any resources related to this.
As a first idea (I bet others will have better ones) I would build a copy of the maps with the suburb areas filled with a different color each. Upon clicking the map, I would check the colors of the x,y mouse position but on this invisible copy, and translating the color found back to the suburb ID that corresponds to that color.
If you hold each suburb on a different object, you can copy it to your visible map canvas and use it to color fill the area.
or if your map is static (ie… you are using just one or two specific maps)
then manually create an array of polygons, where each polygon represents the outline of a suburb.
then when the user clicks a specific area, draw that polygon with a transluncent fill color over the map
This reduces the number of maps involved, as well as the graphics overhead
Check out the transparency property in the graphics class in Xojos language reference. You can use the alpha value for all drawings, meaning this would be possible with pictures (if you use those) as well.