Skip to content

Commit dd87c6a

Browse files
author
Hirbod
committed
Merge pull request #667 from nightstomp/master
Update 1.3.3
2 parents e77d0ed + 421b527 commit dd87c6a

8 files changed

Lines changed: 664 additions & 609 deletions

File tree

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,30 @@ New versions will be announced through the official community. Stay tuned!
2222

2323
###What's up?
2424

25+
v.1.3.3
26+
27+
**Added**
28+
29+
- added zIndex (iOS only, not available for Android)
30+
- [659](https://github.com/wf9a5m75/phonegap-googlemaps-plugin/issues/659)
31+
32+
```js
33+
map.addMarker({
34+
zIndex: int
35+
})
36+
// and
37+
marker.setZIndex()
38+
```
39+
40+
**Fixed**
41+
- Status-Bar Shift-Down
42+
- [657](https://github.com/wf9a5m75/phonegap-googlemaps-plugin/issues/657#issuecomment-146036169)
43+
- Temp Dom-not-updated fix
44+
- [658](https://github.com/wf9a5m75/phonegap-googlemaps-plugin/issues/658)
45+
- Stabilized iOS loading
46+
- [623](https://github.com/wf9a5m75/phonegap-googlemaps-plugin/issues/623)
47+
48+
2549
v.1.3.2
2650
- Updated Google Maps SDK to 1.10.3 - should avoid plist problems on Xcode 7 now
2751

plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version='1.0' encoding='utf-8'?>
2-
<plugin id="plugin.google.maps" version="1.3.2" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
2+
<plugin id="plugin.google.maps" version="1.3.3" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
33
<name>phonegap-googlemaps-plugin</name>
44
<js-module name="phonegap-googlemaps-plugin" src="www/googlemaps-cdv-plugin.js">
55
<clobbers target="plugin.google.maps" />

src/android/plugin/google/maps/GoogleMaps.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ private enum TEXT_STYLE_ALIGNMENTS {
120120
private ViewGroup root;
121121
private final int CLOSE_LINK_ID = 0x7f999990; //random
122122
private final int LICENSE_LINK_ID = 0x7f99991; //random
123-
private final String PLUGIN_VERSION = "1.2.5";
123+
private final String PLUGIN_VERSION = "1.3.3";
124124
private MyPluginLayout mPluginLayout = null;
125125
public boolean isDebug = false;
126126
private GoogleApiClient googleApiClient = null;
@@ -141,7 +141,7 @@ public void initialize(final CordovaInterface cordova, final CordovaWebView webV
141141
isRelease = !((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) == ApplicationInfo.FLAG_DEBUGGABLE);
142142
} catch (Exception e) {}
143143

144-
Log.i("CordovaLog", "This app uses phonegap-googlemaps-plugin version " + PLUGIN_VERSION);
144+
//Log.i("CordovaLog", "This app uses phonegap-googlemaps-plugin version " + PLUGIN_VERSION);
145145

146146
if (!isRelease) {
147147
cordova.getThreadPool().execute(new Runnable() {
@@ -192,8 +192,8 @@ public void run() {
192192
e.printStackTrace();
193193
}
194194
*/
195-
if (Build.VERSION.SDK_INT >= 11){
196-
view.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
195+
if (Build.VERSION.SDK_INT >= 21){
196+
view.setLayerType(View.LAYER_TYPE_HARDWARE, null);
197197
}
198198

199199
root.setBackgroundColor(Color.WHITE);

src/android/plugin/google/maps/MyPluginLayout.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ public MyPluginLayout(View view, Activity activity) {
5252
this.root = (ViewGroup) view.getParent();
5353
this.context = view.getContext();
5454
view.setBackgroundColor(Color.TRANSPARENT);
55-
if (VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
56-
view.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
55+
if (VERSION.SDK_INT >= 21) {
56+
view.setLayerType(View.LAYER_TYPE_HARDWARE, null);
5757
}
5858
frontLayer = new FrontLayerLayout(this.context);
5959

src/android/plugin/google/maps/PluginMarker.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ private void createMarker(final JSONArray args, final CallbackContext callbackCo
8080
if (opts.has("opacity")) {
8181
markerOptions.alpha((float) opts.getDouble("opacity"));
8282
}
83+
if (opts.has("zIndex")) {
84+
// do nothing, API v2 has no zIndex :(
85+
}
8386
Marker marker = map.addMarker(markerOptions);
8487

8588

@@ -388,6 +391,18 @@ private void setOpacity(final JSONArray args, final CallbackContext callbackCont
388391
String id = args.getString(1);
389392
this.setFloat("setAlpha", id, alpha, callbackContext);
390393
}
394+
395+
/**
396+
* Set zIndex for the marker (dummy code, not available on Android V2)
397+
* @param args
398+
* @param callbackContext
399+
* @throws JSONException
400+
*/
401+
@SuppressWarnings("unused")
402+
private void setZIndex(final JSONArray args, final CallbackContext callbackContext) throws JSONException {
403+
// nothing to do :(
404+
// it's a shame google...
405+
}
391406

392407
/**
393408
* set position

0 commit comments

Comments
 (0)