(iOS) Bug fix: the animation property of Marker class does not work
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.2.0-beta-20180129-1110" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
+<plugin id="cordova-plugin-googlemaps" version="2.2.0-beta-20180129-1132" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<name>cordova-plugin-googlemaps</name>
<js-module name="BaseClass" src="www/BaseClass.js">
<runs />

MODIFY
src/ios/GoogleMaps/PluginMarker.m
src/ios/GoogleMaps/PluginMarker.m
if ([@"0" isEqualToString:visibleValue]) {
// false
visible = NO;
+ if (iconProperty == nil) {
+ iconProperty = [NSMutableDictionary dictionary];
+ }
[iconProperty setObject:[NSNumber numberWithBool:false] forKey:@"visible"];
} else {
// default or true
+ if (iconProperty == nil) {
+ iconProperty = [NSMutableDictionary dictionary];
+ }
[iconProperty setObject:[NSNumber numberWithBool:true] forKey:@"visible"];
}
// Animation
if ([json valueForKey:@"animation"]) {
animation = [json valueForKey:@"animation"];
- if (iconProperty) {
- [iconProperty setObject:animation forKey:@"animation"];
+ if (iconProperty == nil) {
+ iconProperty = [NSMutableDictionary dictionary];
}
+ [iconProperty setObject:animation forKey:@"animation"];
+ NSLog(@"--->animation = %@", animation);
}
- if (iconProperty) {
if ([json valueForKey:@"infoWindowAnchor"]) {
[iconProperty setObject:[json valueForKey:@"infoWindowAnchor"] forKey:@"infoWindowAnchor"];
}
+ if (iconProperty && [iconProperty objectForKey:@"icon"]) {
// Load icon in asynchronise
[self setIcon_:marker iconProperty:iconProperty callbackBlock:callbackBlock];
if (animation) {
- [self setIcon_:marker iconProperty:iconProperty callbackBlock:callbackBlock];
+ [self setMarkerAnimation_:animation marker:marker callbackBlock:^(void) {
+ callbackBlock(YES, marker);
+ }];
} else {
callbackBlock(YES, marker);
}

(iOS) Bug fix: the animation property of Marker class does not work