Hello all,
I'm using VB6 and I have a question.
SHORT VERSION:
I need to create a thematic US map, i.e. I need to display a map of a given US state, with each region (county) in the map displayed in a different color, based on values coming from a database.
Thus, in a map that looks like this: each region (county) will be displayed in a different color depending on the database values.
How can I do that?
LONG VERSION
I have jpg images of all US states and each jpg is already divided into regions as the map shown in the link above. In a database, I have the longitude/latitude values of all regions in any given state.
What I think I should do is the following:
1. Load the jpg of a given state into a picture box
2. Locate a region in the picture box
3. Color the region based on some business logic and values coming from a database.
Steps 1 and 3 are simple. I already have the jpg of each state and each jpg already shows the regions. Also, a programmer who worked on this problem before me wrote code which identifies a given region on the picture box using longitude/latitude values for that region, and he writes texts on top of that region - works like a charm.
Step 2 is the problem, however. How on earth can I identify the entire, odd-shaped region of a given county? Can I do this with latitude/longitude alone or do I need some other data which describes the exact area of each region?
Can someone shed some light?
Thanks
_________________________________
I think, therefore I am. [Rene Descartes]
I'm using VB6 and I have a question.
SHORT VERSION:
I need to create a thematic US map, i.e. I need to display a map of a given US state, with each region (county) in the map displayed in a different color, based on values coming from a database.
Thus, in a map that looks like this: each region (county) will be displayed in a different color depending on the database values.
How can I do that?
LONG VERSION
I have jpg images of all US states and each jpg is already divided into regions as the map shown in the link above. In a database, I have the longitude/latitude values of all regions in any given state.
What I think I should do is the following:
1. Load the jpg of a given state into a picture box
2. Locate a region in the picture box
3. Color the region based on some business logic and values coming from a database.
Steps 1 and 3 are simple. I already have the jpg of each state and each jpg already shows the regions. Also, a programmer who worked on this problem before me wrote code which identifies a given region on the picture box using longitude/latitude values for that region, and he writes texts on top of that region - works like a charm.
Step 2 is the problem, however. How on earth can I identify the entire, odd-shaped region of a given county? Can I do this with latitude/longitude alone or do I need some other data which describes the exact area of each region?
Can someone shed some light?
Thanks
_________________________________
I think, therefore I am. [Rene Descartes]