Fix: kml overlay
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.2.0-beta-20180119-1431" 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-20180120-0030" 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 />
@@ -228,8 +228,13 @@ The native map view is faster, use less network usage, display 3D views, and eve
<resource-file src="src/android/res/layout/dummy_infowindow.xml" target="res/layout/dummy_infowindow.xml"/>
- <framework src="com.google.android.gms:play-services-maps:+" />
- <framework src="com.google.android.gms:play-services-location:+" />
+ <!--
+ Minimum required version of Google Play Services SDK for this plugin.
+ https://developers.google.com/android/guides/releases
+ -->
+ <preference name="playServicesVersion" default="11.8.+" />
+ <framework src="com.google.android.gms:play-services-maps:$playServicesVersion" />
+ <framework src="com.google.android.gms:play-services-location:$playServicesVersion" />
</platform>
<!-- ios -->

MODIFY
www/KmlOverlay.js
www/KmlOverlay.js
@@ -88,21 +88,24 @@ var KmlOverlay = function(map, kmlId, camera, kmlData, kmlOverlayOptions) {
map.get("invisible_dot").setPosition(position);
var description = overlay.get("description");
- if (description) {
- description = description.value;
- } else if (overlay.get("extendeddata")) {
+ if (!description && overlay.get("extendeddata")) {
var extendeddata = overlay.get("extendeddata");
var keys = Object.keys(extendeddata);
- var table = [
- "<table border='1'>"
- ];
+ var table = [];
keys.forEach(function(key) {
+ if (extendeddata[key] !== "" && extendeddata[key] !== null && extendeddata[key] !== undefined) {
table.push("<tr><th>" + key + "</th><td>" + extendeddata[key] + "</td></tr>");
+ }
});
+ if (table.length > 0) {
+ table.unshift("<table border='1'>");
table.push("</table>");
description = table.join("");
+ overlay.set("description", {
+ value: description
+ });
+ }
}
- description = description || "";

Fix: kml overlay