Two years later, I've run into the same issue. The MarkerManager seems to
ignore markers if the current viewport is below the minimum configured for
the MarkerManager. Certainly seems counter-intuitive to me. Whether or not
a marker is displayed at a given level shouldn't prevent you from managing
add/removal of the marker, regardless of zoom level.
Anyone know how to workaround this issue?
On Thursday, May 6, 2010 11:16:57 AM UTC-5, nlraley wrote:
>
> I just recently managed to get my MarkerManager code to display my
> markers; however, now that it is displaying them it doesn't appear to be
> paying any attention to the ZoomLevel in which those markers are set to
> display.
>
> Basically what I have is 4 sets of arrays for 4 different types of markers
> I want to display at 4 different zoom levels.
>
> I have also created 4 MarkerManagers to handle each of these types of
> Markers, as 1 was seeming to be having some difficulty display these, it
> didn't like me passing in one array then going through and tossing in
> another array, it gave me some error regarding length being null or not
> defined.
>
> Anyway, I have the markers all up and showing, but they are not removing
> themselves when zooming in or out. I even tried pulling a refresh on the
> zoomend event to no avail, they all still show up. Here is a tidbit of the
> code, I can't post a page b/c I am pulling values from c++ code that I have
> been working on.
>
>
>
> //-------------------------------------------------------------------------------
> // Function to actually draw the BreadCrumbMarkers on the map
>
> //-------------------------------------------------------------------------------
> function DrawBreadCrumbMarkers() {
>
> //-------------------------------------------------------------------------------
> // Set the options for the BreadCrumb Marker Manager
>
> //-------------------------------------------------------------------------------
> BreadCrumbMMOptions = { borderPadding: 50, trackMarkers: true };
>
> //-------------------------------------------------------------------------------
>
> //-------------------------------------------------------------------------------
> // Create the Marker Manager for Bread Crumbs called BreadCrumbMM
> // Set its options to BreadCrumbMMOptions defined above
>
> //-------------------------------------------------------------------------------
> BreadCrumbMM = new MarkerManager(map, BreadCrumbMMOptions);
> BreadCrumbMMStartFinish = new MarkerManager(map, BreadCrumbMMOptions);
> BreadCrumbMMIntersection = new MarkerManager(map, BreadCrumbMMOptions);
> BreadCrumbMMKeyPoint = new MarkerManager(map, BreadCrumbMMOptions);
>
> //-------------------------------------------------------------------------------
>
> //-------------------------------------------------------------------------------
> // Call the addMarkers function of the Marker Manager
> // This passes the array of BreadCrumbMarkers we created
> // that has all the bread crumbs in it to the Marker Manager
>
> //-------------------------------------------------------------------------------
> BreadCrumbMM.addMarkers(BreadCrumbMarkers, 14);
> BreadCrumbMMStartFinish.addMarkers(BreadCrumbMarkersStartFinish, 0);
> BreadCrumbMMIntersection.addMarkers(BreadCrumbMarkersIntersection, 0);
> BreadCrumbMMKeyPoint.addMarkers(BreadCrumbMarkersKeyPoint, 0);
>
> //-------------------------------------------------------------------------------
>
> //-------------------------------------------------------------------------------
> // Refresh the BreadCrumbMM so it displays the markers we just added
>
> //-------------------------------------------------------------------------------
> BreadCrumbMM.refresh();
> BreadCrumbMMStartFinish.refresh();
> BreadCrumbMMIntersection.refresh();
> BreadCrumbMMKeyPoint.refresh();
>
> //-------------------------------------------------------------------------------
> }
>
> //-------------------------------------------------------------------------------
>
> This function is called in my c++ shortly after I have called functions
> filling the appropriate arrays like:
> var BreadCrumb = new GMarker(point, {"icon": FinishPoint, "clickable":
> true, "draggable": false });
> BreadCrumbMarkersKeyPoint.push(BreadCrumb);
>
> I did this for each of my 4 arrays.
>
> Any idea as to why my BreadCrumbMM manager is not removing the markers
> within it after I reach a zoom out past level 14?
>
> Thanks
>
> --
> 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]<javascript:>
> .
> To unsubscribe from this group, send email to
> [email protected] <javascript:>.
> For more options, visit this group at
> http://groups.google.com/group/google-maps-api?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Google Maps API V2" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-maps-api/-/Gzz_SEJvI-QJ.
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.