Skip to content
This repository was archived by the owner on Nov 30, 2018. It is now read-only.
This repository was archived by the owner on Nov 30, 2018. It is now read-only.

Dynamically adding markers with clustering enabled results in flickering as cluster updates #1863

Open
@damiangreen

Description

@damiangreen

I'm dynamically loading a rectangular region of points, and adding them to my markers collection. on the 'idle' event.
It takes around a second to update with visual oddities as the cluster manager adds the markers and then tries to redraw the cluster icons.

I've tried concatenating the array to in one go to see if that would prevent this redraw flicker.
Is there a way I can prevent angular google maps from redrawing until the cluster has worked itself out?
asd
Note, this works really smoothly in the non angular version.

<ui-gmap-google-map
  control="myGoogleMap"
  zoom='map2.zoom'
  center="map2.center"
  events="map2.events"
  ng-cloak>
  <ui-gmap-markers
    models="map2.markers"
    typeOptions={minimumClusterSize : 10,
    imagePath : '//cdn.rawgit.com/mahnunchik/markerclustererplus/master/images/m'}
    type="'cluster'"
    coords="'self'"
    idkey="id"
    options="'options'"
    events="map2.markersEvents"
    icon="'icon'"></ui-gmap-markers>
</ui-gmap-google-map>

...

$scope.map2.markers = $scope.map2.markers.concat(markersToAdd);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions