Plotting 500 US cities to a map

2.5k Views Asked by At

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.

2

There are 2 best solutions below

0
On

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/

2
On

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/