Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marker Cluster not resetting count when updated via ajax #154

Open
GoogleCodeExporter opened this issue Mar 23, 2016 · 4 comments
Open

Marker Cluster not resetting count when updated via ajax #154

GoogleCodeExporter opened this issue Mar 23, 2016 · 4 comments

Comments

@GoogleCodeExporter
Copy link

Using the following xhtml

<h:selectOneMenu value="#{viewMapDashboard.selectedMapView}">
    <f:selectItems value="#{viewMapDashboard.mapViews}" var="mapView" itemLabel="#{mapView.name}" itemValue="#{mapView.id}"/>
    <f:ajax execute="@this" render="mapPanel dataSets"/>
</h:selectOneMenu>
<h:selectOneMenu id="dataSets" value="#{viewMapDashboard.selectedDataSet}">
    <f:selectItems value="#{viewMapDashboard.selectedMapView.dataSets}" var="mapDataSet" itemLabel="#{mapDataSet.startDate.time} - #{mapDataSet.endDate.time}" itemValue="#{mapDataSet.id}"/>
    <f:ajax execute="@this" render="mapPanel"/>
</h:selectOneMenu>
<h:panelGroup  id="mapPanel" >
    <m:map width="100%" height="100%" partiallyTriggered="true"  latitude="0.01" longitude="10.14" zoom="2" enableScrollWheelZoom="true" >
        <m:mapControl name="GSmallMapControl"/>
        <m:markerCluster>
            <ui:repeat value="#{viewMapDashboard.marks}" var="mapPoint">
                <m:marker  latitude="#{mapPoint.locationPoint.latitute}" longitude="#{mapPoint.locationPoint.longitude}"/>
            </ui:repeat>
        </m:markerCluster>
    </m:map>
</h:panelGroup>

On making a selection from one of the drop down menus (which are lists of 
static mock data currently) the marker cluster count isnt reset back to zero 
(or the markers aren;t removed) meaning it gets larger each time a selection is 
made since it adds to the previous count.

Original issue reported on code.google.com by [email protected] on 7 Feb 2011 at 6:04

@GoogleCodeExporter
Copy link
Author

Okay I'm barking up the wrong tree here... Either I've done something wrong or 
there is a bug else where.  I've now created an empty selectable set of data 
and selecting that doesn't change the markers so theres clearly something more 
obvious wrong.

Original comment by [email protected] on 8 Feb 2011 at 2:24

@GoogleCodeExporter
Copy link
Author

I've reconfirmed the existence of this bug, there was an unrelated issue in my 
code which was causing the markers not to update which i fixed but the clusters 
still increase in value, even when i switch between the empty list of markers.

Original comment by [email protected] on 8 Feb 2011 at 3:16

@GoogleCodeExporter
Copy link
Author

Can you post your code as is right now? I'll take a look

Original comment by [email protected] on 28 May 2011 at 8:39

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

I have the same issue with a similar xhtml code. Rerendering by a4j:support 
just adds markers even if they are already on the map. The total number of 
markers increases with every rerender. That can be clearly seen if 
includeExtendedComponents="true".

If the center of the map has been moved and new markers are added on new 
positions, then previously added markers are still visible on their previous 
places.

It looks like a 'resetPreviousMarkers='true' attribute is missing... I'd even 
say that such a feature should be a default behavior. Otherwise partial 
triggering is useless.

Original comment by [email protected] on 30 Jun 2011 at 6:33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant