2

I have 500 US cities in a MySQL table. I have the city name, state, longitude and latitude. I want to visually see these cities plotted on a map of the US.

How can I do this? Are they any free tools available? Google Maps or Google Earth maybe?

Obviously, it would take forever to plot each city individually. So I need a quick way of doing it, either through a program or by exporting the table as a spreadsheet and uploading it into some kind of generator that will do the plotting for me.

Please let me know your ideas. Thanks.

sqlman
  • 155
  • 1
  • 1
  • 9

2 Answers2

1

googlemaps (or any similar maps program) Depending on how you want to implement it, I would plot all the information, load up flags based on the long and lat, and then maybe have an unordered list of cities with either data attrs with the lat/long, or meta tags as children elements with lat and long. eventlistener that triggers on click and centers on the lat and long.

more info http://code.google.com/apis/maps/documentation/javascript/

Last Rose Studios
  • 2,461
  • 20
  • 30
0

In this last year, google geochart API improved a lot and can be consider as a possibility for this also.

Check the API Docs here: https://developers.google.com/chart/interactive/docs/gallery/geochart

You can plot markers to a US map with the lat/lon values, and they will load instantly.

I've never done that with such a big number of markers (500), but I did it with around 200 markers.

US Map with large number of Markers

You can check it in action on my website: http://cmoreira.net/interactive-world-maps-demo/interactive-map-load-large-number-of-markers/

CMoreira
  • 1,698
  • 1
  • 12
  • 27
  • 1
    Thank you for including the disclosure; Great! Now, for the next step to help you with answers: You should include the important parts of an answer on this site, in your answer post itself; not just a 'summary' of what your link contains. Basically, the important points of your answer should stand alone here, on this site; and any links should only be for additional information. – Andrew Barber Dec 01 '12 at 14:25
  • Thanks for the tips Andrew! Still new and learning here at stackoverflow. In this case I left the code out, since the question is also very broad. But i'll take your tips in consideration, of course. Cheers – CMoreira Dec 02 '12 at 11:50