Bug fix: git conflict
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.0.0-beta2-20170524-2345" 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.0.0-beta2-20170525-1050" 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/GoogleMapsViewController.m
src/ios/GoogleMaps/GoogleMapsViewController.m
if (self.activeMarker) {
[self triggerMarkerEvent:@"info_close" marker:self.activeMarker];
- self.map.selectedMarker = nil;
+ //self.map.selectedMarker = nil;
self.activeMarker = nil;
}
}
- (void)mapView:(GMSMapView *)mapView didCloseInfoWindowOfMarker:(nonnull GMSMarker *)marker {
+
+
+ // Get the marker plugin
+ NSString *pluginId = [NSString stringWithFormat:@"%@-marker", self.mapId];
+ CDVPlugin<MyPlgunProtocol> *plugin = [self.plugins objectForKey:pluginId];
+
+ // Get the marker properties
+ NSString *markerPropertyId = [NSString stringWithFormat:@"marker_property_%lu", (unsigned long)marker.hash];
+ NSDictionary *properties = [plugin.objects objectForKey:markerPropertyId];
+
+ if (![[properties objectForKey:@"useHtmlInfoWnd"] boolValue]) {
[self triggerMarkerEvent:@"info_close" marker:marker];
- self.map.selectedMarker = nil;
+ }
+
+ //self.map.selectedMarker = nil; // <-- this cause the didCloseInfoWindowOfMarker event again
self.activeMarker = nil;
}

MODIFY
www/Map.js
www/Map.js
@@ -580,11 +580,12 @@ Map.prototype.setDiv = function(div) {
*/
Map.prototype.getVisibleRegion = function(callback) {
var self = this;
- var northeast = self.get("camera_northeast");
- var southwest = self.get("camera_southwest");
- var latLngBounds = new LatLngBounds(northeast, southwest);
+ var cameraPosition = self.get("camera");
+
+ var latLngBounds = new LatLngBounds(cameraPosition.northeast, cameraPosition.southwest);
if (typeof callback === "function") {
+ console.log("[deprecated] getVisibleRegion() is changed. Please check out the https://goo.gl/yHstHQ");
callback.call(self, latLngBounds);
}
@@ -912,7 +913,7 @@ Map.prototype.addMarker = function(markerOptions, callback) {
markerOptions.rotation = markerOptions.rotation || 0;
markerOptions.opacity = parseFloat("" + markerOptions.opacity, 10) || 1;
markerOptions.disableAutoPan = markerOptions.disableAutoPan === true;
- markerOptions.useHtmlInfoWnd = !(markerOptions.infoWindow === undefined);
+ markerOptions.useHtmlInfoWnd = !markerOptions.title && !markerOptions.snippet;
markerOptions.noCache = markerOptions.noCache === true; //experimental
if ("styles" in markerOptions) {
@@ -1064,9 +1065,8 @@ Map.prototype.getCameraTilt = function() {
Map.prototype.getCameraBearing = function() {
return this.get("camera_bearing");
};
-Map.prototype._onCameraEvent = function(eventName, params) {
- //var cameraPosition = new CameraPosition(params);
- var cameraPosition = params;
+
+Map.prototype._onCameraEvent = function(eventName, cameraPosition) {
this.set('camera', cameraPosition);
this.set('camera_target', cameraPosition.target);
this.set('camera_zoom', cameraPosition.zoom);

Bug fix: git conflict
https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1465