(Android) update: check if style has specified property
MODIFY
README.md
README.md
## Release Notes
- **v2.4.4**
- Fix: (Browser) All methods were tested, and fixed lots of bugs.
+ - Fix: (Android/iOS) Executes `map.animateCamera()` while map has been detached automatically causes dead lock.
- **v2.4.3**
- Fix: (Browser) HTMLInfoWindow displays unnecessary scroll bars.

MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.4.4-beta-20180917-1003" 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.4.4-beta-20180917-1010" 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="Promise" src="www/Promise.js">
<runs/>

MODIFY
src/android/plugin/google/maps/PluginMap.java
src/android/plugin/google/maps/PluginMap.java
@@ -955,6 +955,7 @@ public class PluginMap extends MyPlugin implements OnMarkerClickListener,
int maxWidth = 0;
if (styles != null) {
+ if (styles.has("width")) {
try {
int width = 0;
String widthString = styles.getString("width");
@@ -979,7 +980,9 @@ public class PluginMap extends MyPlugin implements OnMarkerClickListener,
} catch (Exception e) {
e.printStackTrace();
}
+ }
+ if (styles.has("maxWidth")) {
try {
String widthString = styles.getString("maxWidth");
@@ -1003,6 +1006,7 @@ public class PluginMap extends MyPlugin implements OnMarkerClickListener,
e.printStackTrace();
}
}
+ }
windowLayer.setLayoutParams(layoutParams);
@@ -1013,6 +1017,7 @@ public class PluginMap extends MyPlugin implements OnMarkerClickListener,
int textAlignment = View.TEXT_ALIGNMENT_GRAVITY;
if (styles != null) {
+ if (styles.has("text-align")) {
try {
String textAlignValue = styles.getString("text-align");
@@ -1035,6 +1040,7 @@ public class PluginMap extends MyPlugin implements OnMarkerClickListener,
e.printStackTrace();
}
}
+ }
if (title != null) {
if (title.contains("data:image/") && title.contains(";base64,")) {
@@ -1075,6 +1081,7 @@ public class PluginMap extends MyPlugin implements OnMarkerClickListener,
//----------------------------------------
int fontStyle = Typeface.NORMAL;
if (styles != null) {
+ if (styles.has("font-style")) {
try {
if ("italic".equals(styles.getString("font-style"))) {
fontStyle = Typeface.ITALIC;
@@ -1082,6 +1089,8 @@ public class PluginMap extends MyPlugin implements OnMarkerClickListener,
} catch (JSONException e) {
e.printStackTrace();
}
+ }
+ if (styles.has("font-weight")) {
try {
if ("bold".equals(styles.getString("font-weight"))) {
fontStyle = fontStyle | Typeface.BOLD;
@@ -1090,6 +1099,7 @@ public class PluginMap extends MyPlugin implements OnMarkerClickListener,
e.printStackTrace();
}
}
+ }
textView.setTypeface(Typeface.DEFAULT, fontStyle);
if (maxWidth > 0) {

(Android) update: check if style has specified property