Can anyone show me how to add an addlistener in to the marker of
MarkerClusterer??
The code:
function initialize() {
if(GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById('map'));
map.setCenter(new GLatLng(52.132633, 5.291266), 7);
map.addControl(new GLargeMapControl3D());
map.addControl(new GMapTypeControl());
var icon = new GIcon(G_DEFAULT_ICON);
icon.image = "http://chart.apis.google.com/chart?
cht=mm&chs=24x32&chco=FFFFFF,008CFF,000000&ext=.png";
var markers = [];
<?php
$sql = "SELECT * FROM markers";
$result = mysql_query($sql) or die(mysql_error());
$row = mysql_num_rows($result);
while ($record = mysql_fetch_array($result)) {
echo '
var latlng = new
GLatLng('.$record['lat'].', '.$record['lng'].');
var marker = new GMarker(latlng, {icon:
icon});
markers.push(marker);
';
}
?>
var markerCluster = new MarkerClusterer(map, markers);
}
}
Thanks in advance
--
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.