views:

1812

answers:

1

Hello!

At first I want to say: I couldn't find a support forum for this library so I would like to try it here. I hope such questions are allowed here and the link to my page needn't be removed. The link is only for seeing how it works and which parts don't work. Please don't remove it.

Now to the question :)

I want to use the library "MarkerClusterer" (Google Code page) to cluster my markers on Google Maps via the API. Here's described how it works: Documentation -> Examples

Unfortunately, it doesn't work on my site and I don't know why. Could you please help me? I can't find the fault in my code:

Link (just as a demo)

Can you find the fault?

I hope you can help me. Thanks in advance!

+1  A: 

I get this error in Firebug:

GOverlay is not defined
ClusterMarker_.prototype = new GOverlay();

Which probably is caused by running your initialize function before Google Maps has finished loading. Try removing the duplicate tag:

<div class="clear"></div>
<body onload="initialize()" onunload="GUnload()">
48<div class="grid_12">

I don't think you're supposed to add each marker to the map when you use MarkerCluser. Try removing this pr marker:

map.addOverlay(markierung1);
gregers
Thank you for these good tips! The "addOverlay" isn't necessary, you're right. And the "body" tag was duplicate, too. I've corrected both faults.This didn't solve my main problem but I found out how to solve it by chance. The "markerclusterer.js" must be included after including "http://maps.google.com/maps?file=api". These two includes were changed in my code.