Hi there,
I am having problems using the MarkerManager. Somehow Markers added with the MarkerManager do not show up, though i do mgr.refresh();
It works when i use basic map.addOverlay(marker);
but not when using mgr.addMarker(marker);
. Weird. Hope someone here can help.
Here's the relevant code:
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map"));
bounds = new GLatLngBounds();
map.setCenter(new GLatLng(48.25, 11.00), 4);
mgr = new MarkerManager(map, mgr_options);
markers = createSpotMarkers(spots); // parsing spots, extending bounds, creating Array of GMarkers etc, pretty basic and seems not be relevant.
mgr.addMarkers(markers); // does not work
map.addOverlay(markers[0]); // works
mgr.addMarker(markers[0]); // does not work either
map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds)-1);
mgr.refresh();
}