Bug fix: Markers images are loaded after few ms (issue
MODIFY
src/android/plugin/google/maps/PluginMarkerCluster.java
src/android/plugin/google/maps/PluginMarkerCluster.java
@@ -268,7 +268,8 @@ public class PluginMarkerCluster extends PluginMarker {
targetMarkerId = oldMarkerId;
markerProperties = changeProperties.get(oldMarkerId);
marker = map.addMarker(new MarkerOptions()
- .position(new LatLng(markerProperties.getDouble("lat"), markerProperties.getDouble("lng"))));
+ .position(new LatLng(markerProperties.getDouble("lat"), markerProperties.getDouble("lng")))
+ .visible(false));
if (markerProperties.containsKey("title")) {
marker.setTitle(markerProperties.getString("title"));
} else {
@@ -331,7 +332,8 @@ public class PluginMarkerCluster extends PluginMarker {
oldMarkerId = deleteClusterIDs.remove(0);
} else {
marker = map.addMarker(new MarkerOptions()
- .position(new LatLng(0, 0)));
+ .position(new LatLng(0, 0))
+ .visible(false));
}
}
}
@@ -427,7 +429,6 @@ public class PluginMarkerCluster extends PluginMarker {
//--------------------------------------
// Icon is set to marker
//--------------------------------------
-
synchronized (waitCntManager) {
int waitCnt = waitCntManager.get(clusterId);
waitCnt = waitCnt - 1;
@@ -572,6 +573,8 @@ public class PluginMarkerCluster extends PluginMarker {
}
}
+ marker.setVisible(true);
+
pluginMarkers.put(markerId, STATUS.CREATED);
callback.onPostExecute(object);
}

MODIFY
src/ios/GoogleMaps/PluginMarkerCluster.m
src/ios/GoogleMaps/PluginMarkerCluster.m
@@ -14,6 +14,7 @@ const int GEOCELL_GRID_SIZE = 4;
NSObject *dummyObject;
BOOL recyleOption = NO;
+
-(void)setGoogleMapsViewController:(GoogleMapsViewController *)viewCtrl
{
self.mapCtrl = viewCtrl;
@@ -224,7 +225,6 @@ BOOL recyleOption = NO;
marker.tracksViewChanges = NO;
marker.tracksInfoWindowChanges = NO;
marker.appearAnimation = NO;
- marker.map = self.mapCtrl.map;
if ([markerProperties objectForKey:@"title"]) {
marker.title = [markerProperties objectForKey:@"title"];
}

Bug fix: Markers images are loaded after few ms (issue #7)