Knap oven på Gmap-kort
Jeg kunne tænke mig at sætte en "tilbage-knap" oven på et kort lavet i Google Maps:Kode:
<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>
<style type="text/css">
v\:* {
behavior:url(#default#VML);
}
</style>
<!-- Make the document body take up the full screen -->
<style type="text/css">
html, body {width: 100%; height: 100%}
body {margin-top: 0px; margin-right: 0px; margin-left: 0px; margin-bottom: 0px;}
</style>
<script type="text/javascript"src="http://maps.google.com/maps?file=api&v&key=ABQIAAAAajCtqqFUu9n7EPvQIA0qUhQ53NEMdPfN9X999eh7XMUF4EbInkK9xST_E2KAUqAVKznR78184JULp9Kwg">
</script>
<script type="text/javascript">
//<![CDATA[
function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(34.019968,-118.289988), 17);
map.setMapType(G_HYBRID_MAP);
map.addControl(new GSmallMapControl());
map.addControl(new GScaleControl());
map.addControl(new GMapTypeControl());
map.addControl(new GOverviewMapControl());
var marker = new GMarker(new GLatLng(34.019968,-118.289988));
map.addOverlay(marker);
marker.openInfoWindowHtml("<img src='http://gamepipe.usc.edu/images/GamePipeLogoSmall.jpg' width='128' height='41'/> <br/> USC GamePipe Lab<br/> 3650 McClintock Ave, Los Angeles CA");
}
}
//]]>
</script>
</head>
<body onload="load()" onunload="GUnload()">
<div id="map" style="width: 100%; height: 100%;"></div>
</body>
</html>
Knap:
<input type= "button" value="Tilbage" onclick="history.back()" style="cursor:pointer;">
Men hvordan får jeg den tilføjet?