Hallo,
ich binde eine GoogleMap Karte wie folgt ein:
<script type="text/javascript">
//<![CDATA[
var map;
function load()
{
if (GBrowserIsCompatible())
{
map = new GMap2(document.getElementById("googlemape"));
geocoder = new GClientGeocoder();
point = new GLatLng(50.203169,10.138674);
//Die Karte wird bei diesem Punkt zentriert
map.setCenter(point, 5);
<?php
while($row = mysql_fetch_object($ergebnis1))
{
?>
showAddress('<?php print $row->strasse; ?>, <?php print $row->plz; ?> <?php print $row->ort; ?>');
<?php
}
?>
}
}
function showAddress(address)
{
if (geocoder)
{
geocoder.getLatLng(
address
,function(point)
{
if (!point)
{
console.log(address + " not found");
}
else
{
map.setCenter(point, 5);
var marker = new GMarker(point);
map.addOverlay(marker);
// marker.openInfoWindowHtml(address);
}
}
);
}
}
window.addEvent('domready', load);
window.addEvent('unload', GUnload);
//]]>
</script>
<div style="width: 235px; height: 327px; overflow: hidden;">
<div id="googlemape" style="width: 235px; height: 327px;"></div>
</div>
das ganze sieht dann so aus:
sollte aber so aussehen:
ich hoffe jemand hat eine Idee, wie ich das hinbekomme.