I would like to show my site partners a dynamic graph (map of the world), that has like pins representing the countries of the users of my website. When a user signs up, just like a many sites, they choose their location by country. Just wondering if there are projects out there like this, like a php script that will read all the countries from my site and dynamicly (probably with gd) put them on a map (like a pin or something). Anyone?
I know jpgraph has an example of putting pins over a map of the world, but I wouldln't know how to take a country name and match it with the coordinates of that picture.
Mapping Countries by Name
Moderator: General Moderators
You mean something like: http://timvw.madoka.be/ip2location/gmap.php?
(source)
- Basically, you need a database with location -> long, alt values. I've found a list at
http://www.maxmind.com/app/country_latlon and http://www.maxmind.com/app/state_latlon
- And then it's only a matter of finding that place on your map and drawing it.. I decided to use Google Maps instead..
(source)
- Basically, you need a database with location -> long, alt values. I've found a list at
http://www.maxmind.com/app/country_latlon and http://www.maxmind.com/app/state_latlon
- And then it's only a matter of finding that place on your map and drawing it.. I decided to use Google Maps instead..