views:

99

answers:

1

I have a spreadsheet full of street addresses and I want to add them as pin points on a google map. Can anybody tell me if they must be converted to a geo-code to work with the google maps API? And if so, is there a tool that will output a list of addresses in a way where I can just plug it into some javascript and have it good to go?

... Or just some tips. I've never worked with the google maps API before.

+1  A: 

You will need to geocode the street addresses to convert them to latitude/longitude values for your marker objects in Google Maps.

Since you have a static list of addresses, you probably just want to do the geocoding once, get the latitude/longitude values and associate them with the data points your have in the spreadsheet.

Once you have your data points with latitude/longitude associated, you can spin through them creating markers for each one. When you create your marker object, you specify a google.maps.LatLng object in the options:

var marker = new google.maps.Marker({
  position: new google.maps.LatLng(myLatitude, myLongitude), 
  map: map, 
  title:"Hello World!"});  

The map property on the options associates the new marker with the map object.

Cannonade
Muchas gracias!
Peachy
@Peachy No problem :)
Cannonade