Skip to content

Commit 7c522ce

Browse files
committed
Update googlemaps-cdv-plugin.js
1 parent 855478d commit 7c522ce

1 file changed

Lines changed: 10 additions & 15 deletions

File tree

www/googlemaps-cdv-plugin.js

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,21 +1031,16 @@ App.prototype.addGroundOverlay = function(groundOverlayOptions, callback) {
10311031
groundOverlayOptions.zIndex = groundOverlayOptions.zIndex || 1;
10321032
groundOverlayOptions.bounds = groundOverlayOptions.bounds || [];
10331033

1034-
var pluginExec = function() {
1035-
cordova.exec(function(result) {
1036-
var groundOverlay = new GroundOverlay(self, result.id, groundOverlayOptions);
1037-
OVERLAYS[result.id] = groundOverlay;
1038-
if (typeof groundOverlayOptions.onClick === "function") {
1039-
groundOverlay.on(plugin.google.maps.event.OVERLAY_CLICK, groundOverlayOptions.onClick);
1040-
}
1041-
if (typeof callback === "function") {
1042-
callback.call(self, groundOverlay, self);
1043-
}
1044-
}, self.errorHandler, PLUGIN_NAME, 'exec', ['GroundOverlay.createGroundOverlay', groundOverlayOptions]);
1045-
};
1046-
1047-
pluginExec();
1048-
1034+
cordova.exec(function(result) {
1035+
var groundOverlay = new GroundOverlay(self, result.id, groundOverlayOptions);
1036+
OVERLAYS[result.id] = groundOverlay;
1037+
if (typeof groundOverlayOptions.onClick === "function") {
1038+
groundOverlay.on(plugin.google.maps.event.OVERLAY_CLICK, groundOverlayOptions.onClick);
1039+
}
1040+
if (typeof callback === "function") {
1041+
callback.call(self, groundOverlay, self);
1042+
}
1043+
}, self.errorHandler, PLUGIN_NAME, 'exec', ['GroundOverlay.createGroundOverlay', groundOverlayOptions]);
10491044

10501045
};
10511046

0 commit comments

Comments
 (0)