Hi all,
I'm having trouble adding my google map to my website.
I've created a map under MyMaps; I've generated the API key; I've cut and pasted their example under google api documentation; I've replaced the key example with my key - and now I can't find out how to insert my map details into the code. I keep getting their Palo Alto location example.
The help docs just wander off into elaborate explanation of all the fab things google can do but I just need that basic bit of info.
I've spent hours combing the docs and the help groups - who all seem to be developers with loads of javascript experience, which I'm not. It's driving me crazy!
If anyone can help, in very simple language please,
I would be very grateful.
Thanks!
adding a google map to my website
adding a google map to my website
Lounging on the lily pad...
Hi GF
I'm just playing with maps myself. Have a look at
viewtopic.php?t=4643
I think you need to change the map.setCenter line.
HTH
I'm just playing with maps myself. Have a look at
viewtopic.php?t=4643
I think you need to change the map.setCenter line.
HTH
Hello Greenfrog
This is the code for adding a map
where you see 35.95694, 14.42306 change to your Latitude and Longitude centering co-ordinates
Where you see YOUR KEY HERE delete those words and replace with your API key.
Where you see 500px and 300px change to the size you want your map.
You can also change the title line.
Cheers
This is the code for adding a map
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps JavaScript API Example</title>
<script src="http://maps.google.com/maps?file=api&v=2&key=YOUR KEY HERE"
type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
var map = new GMap(document.getElementById("map"));map.addControl(new GSmallMapControl());map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(35.95694, 14.42306),13);
}
}
//]]>
</script>
</head>
<body onload="load()" onunload="GUnload()">
<div id="map" style="width: 500px; height: 300px"></div>
</body>
Where you see YOUR KEY HERE delete those words and replace with your API key.
Where you see 500px and 300px change to the size you want your map.
You can also change the title line.
Cheers
Boy do I need a rest -------
www.terrazasdelatorreapartment.com
The holiday apartment on a golf course.
www.terrazasdelatorreapartment.com
The holiday apartment on a golf course.
Thanks, Billywiz.
That's solved the general map problem - there was a line of code missing in the example I copied from Google Help!
However, it doesn't help me in inserting the Google map with markers etc that I created using Google Maps. Any idea on how to do that?
Thanks!
That's solved the general map problem - there was a line of code missing in the example I copied from Google Help!
However, it doesn't help me in inserting the Google map with markers etc that I created using Google Maps. Any idea on how to do that?
Thanks!
Lounging on the lily pad...
Greenfrog, the maps you make in My maps are completely different to the Map with the API key, you can add various icons and controls etc to the map but you will need to know some coding to do this and all is explained here http://www.google.com/apis/maps/documen ... to_the_Map
What you can do in My Maps is create a link to the map you made by clicking on the "Link to this page" tab just above the map and copying the link that appears and putting this onto your webpage. Hope this helps
Cheers
What you can do in My Maps is create a link to the map you made by clicking on the "Link to this page" tab just above the map and copying the link that appears and putting this onto your webpage. Hope this helps
Cheers
Boy do I need a rest -------
www.terrazasdelatorreapartment.com
The holiday apartment on a golf course.
www.terrazasdelatorreapartment.com
The holiday apartment on a golf course.