Forum Moderators: phranque

Message Too Old, No Replies

Any Google Maps pro's here?

         

kslnor

12:33 pm on Aug 16, 2006 (gmt 0)

10+ Year Member



I am attempting to add a google map to my website, but neither the Google Documentation nor the Google Maps Discussion answers my most basic question, so I am hoping someone here can assist:

How do I get the exact map I want to appear on my web page? Sounds simple, but I can't figure it out. I signed-up for an API key, but how do I get the "link" to the actual map i want to show? I put the Google Map Documentation sample code on a page and it works fine, showing the map indicated in the sample. I just want to have a different map. Any assistance to my most basic question?

Thanks!

LifeinAsia

3:27 pm on Aug 16, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



By a "different map" I assume you mean a different location other than the default location? All you have to do is give it a different set of coordinates- definitely covered in the docs. Example:
map.centerAndZoom(new GPoint(-118.837655, 34.159378), 4);

[edited by: LifeinAsia at 3:28 pm (utc) on Aug. 16, 2006]

stever

5:29 pm on Aug 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You'll find if you search around the Google Maps area that there are (at least) a couple of resources which will help give you the latitude and longitude variables that you need, as well the old way of doing it by finding the variables from the link mechanism.

jason207

2:50 pm on Aug 18, 2006 (gmt 0)

10+ Year Member



look for this line in your map code
map.centerAndZoom(new GPoint('latitude numbers','longitude numbers', zoom number );

change the latitude and longitude to the town you want to map, to get the lat/long of a place you can use google to search for [geocoder] and look for the site with a tld of us, it should be the first. you could also goto yahoo or google maps map the place, then view the source to get it.

yahoo maps allow you to center the map automatically by just an address or zipcode and they do the geocoding for you, the google map api v2 has geocoding for points on the map, but i havent tested to see if you can open a map with just an address or zip, though i assume you probaly can.

james_plato

5:56 am on Aug 20, 2006 (gmt 0)

10+ Year Member



I just added one myself...do a google search on "How to add a Google Map to any web page in less than 10 minutes"

you will find a step by step tutorial

cheers