Marker Clusterer Google Maps
Hy,
I don't know why the marker clusterer don't show my markers grouped , like here : http://media.svennerberg.com/2009/01/screenshot_clusterereffect.jpg
My Code is like this:
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=false">
</script>
<script type="text/javascript">
function initialize() {
var center = new google.maps.LatLng(48.136, 11.586);
var myOptions = {
zoom: 3,
center: center,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);
var points = [];
for (var i = 0; i < 600; i++) {
var point = new google.maps.Marker({
position: new google.maps.LatLng(48.135 + Math.random(), 11.664 + Math.ra开发者_如何学Gondom()),
map: map,
title:"This is where I work"
});
points.push(point);
}
var cluster = new MarkerClusterer(map, points);
}
</script>
</head>
<body onload="initialize()">
<div id="map_canvas" style="width:1000px; height:1000px"></div>
</body>
</html>
but it don't work. Who can tell my why it don't work? Thx
Problem solved :) My html file didn't load the correct json and that's why it didn't worked out
精彩评论