I am trying to build an application that will use an Api like google maps api (or any other api for maps) in order to color the states depending on some information that change.
So for example, let’s say I am going to color states green if they have more than 5 people online and this information will change every minute, how can i use some maps api in order to color the states using javascript, php, and other web development languages but not flash?
If you need more explanation please let me know and i will edit the post to include more information.
This is (NOT) a homework question so please provide as much information and code as possible.
Thanks!
The google map api allows you to change the color of the polygon in your code.
You would need to have the geometries of the states so you can draw them as a layer on top of google maps
I would say have your PHP script generate a new KML file every interval. Here is an example of using KML directly in the google API
http://code.google.com/apis/maps/documentation/examples/geoxml-kml.html
Found under the service examples here:
http://code.google.com/apis/maps/documentation/examples/index.html
I am sure there is probably a KML library in PHO.
You would just do an ajax call on a timer and re-pull KML at the interval you would like. Clear the map after pulling and then re-draw the new KML.