Bug fix: HtmlInfoWindow is displayed in out side of the map view
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.0.0-beta2-20170718-1442" 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-20170718-1602" 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
www/Map.js
www/Map.js
@@ -92,7 +92,11 @@ Map.prototype.getMap = function(mapId, div, options) {
args.push(options);
} else {
- var currentDiv = self.get("div");
+ var positionCSS = common.getStyle(div, "position");
+ if (!positionCSS || positionCSS === "static") {
+ // important for HtmlInfoWindow
+ div.style.position = "relative";
+ }
self.set("visible", true);
options = options || {};
if (options.camera) {
@@ -551,7 +555,6 @@ Map.prototype.setDiv = function(div) {
}
self.set("div", null);
} else {
- var currentDiv = self.get("div");
div.setAttribute("__pluginMapId", self.id);
// Webkit redraw mandatory
@@ -561,6 +564,11 @@ Map.prototype.setDiv = function(div) {
div.style.display='';
self.set("div", div);
+
+ var positionCSS = common.getStyle(div, "position");
+ if (!positionCSS || positionCSS === "static") {
+ div.style.position = "relative";
+ }
elemId = div.getAttribute("__pluginDomId");
if (!elemId) {
elemId = "pgm" + Math.floor(Math.random() * Date.now());

Bug fix: HtmlInfoWindow is displayed in out side of the map view #1561