angularjs - "ghost" clusters when customizing markercluster icon using angular-leaflet-directive -
i'm trying customize angular-leaflet markerclusters following code :
overlays: { defaultoverlay: { type: 'markercluster', name: 'defaultoverlay', visible: true, layeroptions: { showcoverageonhover: true, disableclusteringatzoom: 15, iconcreatefunction: custommarkercluster } } }
i have test sample of 7 markers, defined :
markers: [ { _id: "548f0ab268dc96e7587c0f8f", layer:"defaultoverlay", group: "testgroup1", lat: 20.973368, lng: 40.849463, title: "imperium", message: "215 rockaway parkway, delshire, ohio, 9191", icon: $scope.icons.onlinenotificon, status: 1 }, ... ]
if hide overlay visible: false or don't use overlay, correct amount of markers custommarkercluster never called.
with visible:true, 3 clusters of 4 markers (12 markers instead of 7)
how can prevent markercluster generating incorrect clusters when use overlay ?
apparently, option group messing markercluster generation, deleted group , works fine (+ cleaned example)
{ "_id": "548f0ab268dc96e7587c0f8f", layer:"defaultoverlay", lat: 28.239855, lng: 14.752357, title: "bittor", message: "856 furman avenue, comptche, nebraska, 3995", icon: $scope.icons.onlineicon, status: 0 }
Comments
Post a Comment