Workshop: GoogleMaps auf der eigenen Website

Listing: Der erste Test

<!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=iso-8859-1"/>
<title>Google Maps API Example - Geocoding API</title>
<?php require("gmap_script_inc.php") ?>
<script type="text/javascript">
//<![CDATA[
var map = null;
function load() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(48.137135, 11.575008), 15);
}
}
//]]>
</script>
</head>

<body onload="load()" onunload="GUnload()">
<div id="map" style="width:500px; height: 300px"></div>
</body>
</html>