Bug fix: cluster markers are still remained after zooming out
(Disable to marker recycle mechanism for a while)
MODIFY
src/android/plugin/google/maps/PluginMarkerCluster.java
src/android/plugin/google/maps/PluginMarkerCluster.java
@@ -33,7 +33,8 @@ public class PluginMarkerCluster extends PluginMarker {
private final static ConcurrentHashMap<String, STATUS> pluginMarkers = new ConcurrentHashMap<String, STATUS>();
private final static ConcurrentHashMap<String, Integer> waitCntManager = new ConcurrentHashMap<String, Integer>();
- final Object dummyObj = new Object();
+ private final Object dummyObj = new Object();
+ private boolean recyleOption = false;
enum STATUS {
WORKING,
@@ -145,7 +146,8 @@ public class PluginMarkerCluster extends PluginMarker {
updateClusterIDs.put(clusterId_markerId, clusterId_markerId);
} else {
- if (reuseCnt < deleteCnt) {
+
+ if (recyleOption && reuseCnt < deleteCnt) {
//---------------
// Reuse a marker
//---------------

MODIFY
src/ios/GoogleMaps/PluginMarkerCluster.m
src/ios/GoogleMaps/PluginMarkerCluster.m
const NSString *GEOCELL_ALPHABET = @"0123456789abcdef";
const int GEOCELL_GRID_SIZE = 4;
NSObject *dummyObject;
-
+BOOL recyleOption = NO;
-(void)setGoogleMapsViewController:(GoogleMapsViewController *)viewCtrl
{
@@ -131,7 +131,7 @@ NSObject *dummyObject;
if ([self.objects objectForKey:clusterId_markerId] != nil || [_pluginMarkers objectForKey:clusterId_markerId] != nil) {
[updateClusterIDs setObject:clusterId_markerId forKey:clusterId_markerId];
} else {
- if (deleteCnt > 0) {
+ if (recyleOption && deleteCnt > 0) {
//---------------
// Reuse a marker
//---------------

Bug fix: cluster markers are still remained after zooming out #1
(Disable to marker recycle mechanism for a while)