<!DOCTYPE
HTML PUBLIC "-//
W3C//DTD
HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<
html>
<head>
<title>Gesamteinsatzkarte 2008</title>
<script src="http://maps.google.com/maps?file=
api&v=2&key=blabla" type="text/javascript"></script>
</head>
<body>
<div id="map" style="width: 1024px; height: 768px"></div>
<script type="text/javascript">
//<![CDATA[
var map = new GMap2(document.getElementById("map"));
map.addControl(new GSmallMapControl());
map.enableScrollWheelZoom();
map.enableContinuousZoom();
map.addControl(new GScaleControl());
map.setCenter(new GLatLng(53.537881, 10.036525), 15, G_HYBRID_MAP);
var FEU = new GIcon();
FEU.image = "http://www.f-3917.de/map/images/feuer.png";
FEU.shadow = "http://www.f-3917.de/map/images/feuer_shadow.png";
FEU.iconSize = new GSize(16, 16);
FEU.shadowSize = new GSize(16, 16);
FEU.iconAnchor = new GPoint(0, 0);
FEU.infoWindowAnchor = new GPoint(5, 1);
var FEUK = new GIcon();
FEUK.image = "http://www.f-3917.de/map/images/feuer.png";
FEUK.shadow = "http://www.f-3917.de/map/images/feuer_shadow.png";
FEUK.iconSize = new GSize(16, 16);
FEUK.shadowSize = new GSize(16, 16);
FEUK.iconAnchor = new GPoint(0, 0);
FEUK.infoWindowAnchor = new GPoint(5, 1);
var NOTF = new GIcon();
NOTF.image = "http://www.f-3917.de/map/images/notf.png";
NOTF.shadow = "http://www.f-3917.de/map/images/notf_shadow.png";
NOTF.iconSize = new GSize(16, 16);
NOTF.shadowSize = new GSize(16, 16);
NOTF.iconAnchor = new GPoint(0, 0);
NOTF.infoWindowAnchor = new GPoint(5, 1);
// Creates a marker whose info window displays the given number
function createMarker(point, number)
{
var marker = new GMarker(point, schadensart);
// Show this markers index in the info window when it is clicked
var
html = number;
GEvent.addListener(marker, "click", function() {marker.openInfoWindowHtml(
html);});
return marker;
};
<?php
$link = mysql_connect("
localhost", "blabla", "blabla") or die("Could not connect: " . mysql_error());
mysql_selectdb("maps",$link) or die ("Can\'t use dbmapserver : " . mysql_error());
$result = mysql_query("SELECT * FROM einsaetze",$link);
if (!$result)
{
echo "no results ";
}
while($row = mysql_fetch_array($result))
{
echo "var point = new GLatLng(" . $row['lat'] . "," . $row['lon'] . ");\n";
echo "var schadensart = ". $row['schada'] . ";";
echo "var marker = createMarker(point, '<font face=Arial size=2>[b]Datum:[/b] " . addslashes($row['datum']) . "
[b]Uhrzeit:[/b] " . addslashes($row['uhrzeit']) . " Uhr
[b]Schadensart:[/b] " . addslashes($row['schada']) . "
[b]Einsatzort:[/b] " . addslashes($row['strasse']) . ", " . addslashes($row['ort']) . "');\n";
echo "map.addOverlay(marker);\n";
echo "\n";
}
mysql_close($link);
?>
//]]>
</script>
</body>
</
html>pt>
</body>
</
html>