sure!
here are the whole script
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/
>
<title>Newsletter Nutzer Übersicht</title>
<link href="../css/style.css" media="screen" rel="stylesheet"
type="text/css" />
<script src="http://maps.google.com/maps?file=api&v=2&key=##
google maps api key ##" type="text/javascript"></script>
<script type="text/javascript" src="markerclusterer.js"></
script>
<script type="text/javascript">
//<![CDATA[
var iconBlue = new GIcon();
iconBlue.image = 'http://labs.google.com/ridefinder/images/
mm_20_blue.png';
//iconBlue.shadow = 'http://labs.google.com/ridefinder/images/
mm_20_shadow.png';
iconBlue.iconSize = new GSize(12, 20);
iconBlue.shadowSize = new GSize(22, 20);
iconBlue.iconAnchor = new GPoint(6, 20);
iconBlue.infoWindowAnchor = new GPoint(5, 1);
var iconRed = new GIcon();
//iconRed.image = 'http://labs.google.com/ridefinder/images/
mm_20_red.png';
iconRed.image = 'bullet_red-16x16.png';
//iconRed.shadow = 'http://labs.google.com/ridefinder/images/
mm_20_shadow.png';
iconRed.iconSize = new GSize(16, 16);
//iconRed.shadowSize = new GSize(22, 20);
iconRed.iconAnchor = new GPoint(6, 20);
iconRed.infoWindowAnchor = new GPoint(5, 1);
var customIcons = [];
customIcons["restaurant"] = iconBlue;
customIcons["bar"] = iconRed;
function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(50.972264, 9.788818), 6,
G_NORMAL_MAP);
// Change this depending on the name of your PHP file
GDownloadUrl("phpsqlajax_genxml3.php", function(data) {
var xml = GXml.parse(data);
var markers =
xml.documentElement.getElementsByTagName("marker");
for (var i = 0; i < markers.length; i++) {
var address = markers[i].getAttribute("address");
var point = new
GLatLng(parseFloat(markers[i].getAttribute("lat")),
parseFloat(markers[i].getAttribute("lng")));
var marker = createMarker(point, address);
//map.addOverlay(marker);
markers.push(marker);
}
var markerCluster = new MarkerClusterer(map, markers);
});
}
}
function createMarker(point, address) {
var marker = new GMarker(point, iconRed);
/*
var html = "<b>" + address + "</b>";
GEvent.addListener(marker, 'click', function() {
marker.openInfoWindowHtml(html);
});
*/
return marker;
}
//]]>
</script>
</head>
<body onload="load()" onunload="GUnload()">
<div id="map" style="width: 800px; height: 600px"></div>
</body>
</html>
On 21 Mai, 14:06, Rossko <[email protected]> wrote:
> > i add the these lines
> > markers.push(marker);}
> > var markerCluster = new MarkerClusterer(map, markers);
> > but nothing happend.
>
> Perhaps you haven't included the clusterer script after the API
> script?http://groups.google.com/group/Google-Maps-API/web/why-including-a-li...
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps API" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group
> athttp://groups.google.com/group/google-maps-api?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en.