Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Google Maps on your Site! 1

Status
Not open for further replies.

ChrisHunt

Programmer
Jul 12, 2002
4,056
GB
Apologies to those for whom this isn't news. I only found out about it last week, and thought there may be others here who are similarly ignorant...

Google have published an API that allows (almost) anybody to embed Google Maps within their own websites, completely free:
The Google Maps API lets developers embed Google Maps in their own web pages with JavaScript. You can add overlays to the map (including markers and polylines) and display shadowed "info windows" just like Google Maps.

The Maps API is a free beta service, available for any web site that is free to consumers. Google retains the right to put advertising on the map in the future. Please see the terms of use for more information.
Find out more at .

Lots of examples of this in action at .

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Nice one Chris - I can visualise a few uses for that!

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Did you try the documentation - it worked OK for me:

Just change the Lat & Long of the centre:
map.centerAndZoom(new GPoint(0.75222, 51.75011), 4);
is quite close to me!

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
If you have copied the code from the Google website, it includes the line
Code:
 map.centerAndZoom(new GPoint(-122.1419, 37.4419), 4);
The number -122.1419 represents longitude of 122.1419 degrees West, 37.4419 represents latitude 37.4419 North. The 4 represents zoom level - increase to see more

Change that code line to
Code:
 map.centerAndZoom(new GPoint(-82.4, 27.95), 6);
and see what you get

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top