M
MrNobody
I need to make a user interface which features an interactive map, where all
the states are drawn and the user may click on individual states to get
details on it, and they may color in states different colors and make regions
or groups of similar colored states.
I figured out pretty easily how to get a clickable map where I know what
state the user clicks on, but the problem I am having is how do I color
different states in? And how do I draw borders between the states and between
the regions? I really have no 2D drawing experience so I was hoping someone
here would be able to advise me.
Right now I have a bitmap behind the scenes which maps x,y coordinates to an
individual state then an image drawn on the user interface. The map drawn to
the user interface right now is basically the United States from a satellite
photograph- with the terrain and everything colored in. I used that map to
build my bitmap to map what state a user clicks on from an x,y coord.
But no borders are drawn. I need to somehow trace the boundaries between
different colors on the bitmap file and use that to draw lines. Then probably
using a very similar if not same technique for tracing those borders I can
create the shapes which would be colored in as an overlay when the user
colors in some states and groups them into regions.
What kind of APIs and what techniques would I need to use in order to trace
these bitmap areas so I can build those borders and create shapes I can color
in?
the states are drawn and the user may click on individual states to get
details on it, and they may color in states different colors and make regions
or groups of similar colored states.
I figured out pretty easily how to get a clickable map where I know what
state the user clicks on, but the problem I am having is how do I color
different states in? And how do I draw borders between the states and between
the regions? I really have no 2D drawing experience so I was hoping someone
here would be able to advise me.
Right now I have a bitmap behind the scenes which maps x,y coordinates to an
individual state then an image drawn on the user interface. The map drawn to
the user interface right now is basically the United States from a satellite
photograph- with the terrain and everything colored in. I used that map to
build my bitmap to map what state a user clicks on from an x,y coord.
But no borders are drawn. I need to somehow trace the boundaries between
different colors on the bitmap file and use that to draw lines. Then probably
using a very similar if not same technique for tracing those borders I can
create the shapes which would be colored in as an overlay when the user
colors in some states and groups them into regions.
What kind of APIs and what techniques would I need to use in order to trace
these bitmap areas so I can build those borders and create shapes I can color
in?