Skip to content

Commit

Permalink
Bump up to v2.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
wf9a5m75 committed Feb 28, 2019
2 parents 5fe52cb + 200c5b7 commit 19f1772
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 24 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cordova GoogleMaps plugin for Android, iOS and Browser v2.5.1
# Cordova GoogleMaps plugin for Android, iOS and Browser v2.5.2

| Download | Build test |
| Download | Build test (master branch)|
|----------|---------------------------|
| [![](https://img.shields.io/npm/dm/cordova-plugin-googlemaps.svg)](https://npm-stat.com/charts.html?package=cordova-plugin-googlemaps) |[![](https://travis-ci.org/mapsplugin/cordova-plugin-googlemaps.svg?branch=master)](https://travis-ci.org/mapsplugin/cordova-plugin-googlemaps/branches) |

Expand Down Expand Up @@ -197,6 +197,11 @@
---------------------------------------------------------------------------------------------------------

## Release Notes
- **v2.5.2**
- Fix: (Android/iOS/Browser) MarkerCluster.remove() causes null pointer error.
- Fix: (iOS) touch problem
- Fix: (Android) setMyLocationEnabled(false) does not work

- **v2.5.1**
- Fix: (Android/iOS/Browser) Marker cluster does not work when you zoom in.
- Fix: (iOS) HTML click detection is incorrect.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-googlemaps",
"version": "2.5.1",
"version": "2.5.2",
"description": "Google Maps native SDK for Android and iOS, and Google Maps JavaScript API v3 for browser.",
"cordova": {
"id": "cordova-plugin-googlemaps",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<plugin id="cordova-plugin-googlemaps" version="2.5.1" 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.5.2" 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" />
<asset src="www/promise-7.0.4.min.js.map" target="promise-7.0.4.min.js.map" />
Expand Down
17 changes: 1 addition & 16 deletions src/android/plugin/google/maps/PluginMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -1806,22 +1806,6 @@ public void myMoveCamera(CameraUpdate cameraUpdate, CallbackContext callbackCont
public void setMyLocationEnabled(final JSONArray args, final CallbackContext callbackContext) throws JSONException {

final JSONObject params = args.getJSONObject(0);
Boolean isMyLocationEnabled = false;
if (params.has("myLocation")) {
//Log.d(TAG, "--->myLocation = " + params.getBoolean("myLocation"));
isMyLocationEnabled = params.getBoolean("myLocation");
}

Boolean isMyLocationButtonEnabled = false;
if (params.has("myLocationButton")) {
//Log.d(TAG, "--->myLocationButton = " + params.getBoolean("myLocationButton"));
isMyLocationButtonEnabled = params.getBoolean("myLocationButton");
}
// Request geolocation permission.
if (!isMyLocationButtonEnabled && !isMyLocationEnabled) {
callbackContext.success();
return;
}

boolean locationPermission = PermissionChecker.checkSelfPermission(cordova.getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) == PermissionChecker.PERMISSION_GRANTED;
//Log.d(TAG, "---> setMyLocationEnabled, hasPermission = " + locationPermission);
Expand Down Expand Up @@ -1883,6 +1867,7 @@ public void run() {
}
});
}

/**
* Clear all markups
* @param args Parameters given from JavaScript side
Expand Down
5 changes: 3 additions & 2 deletions src/ios/GoogleMaps/MyPluginLayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,9 @@ - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
// e.g. PhoneGap-Plugin-ListPicker, etc
UIView *subview;
NSArray *subviews = [self.webView.superview subviews];
CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
CGPoint subviewPoint = CGPointMake(browserClickPoint.x, browserClickPoint.y - statusBarFrame.size.height);
//CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
//CGPoint subviewPoint = CGPointMake(browserClickPoint.x, browserClickPoint.y - statusBarFrame.size.height);
CGPoint subviewPoint = CGPointMake(browserClickPoint.x, browserClickPoint.y );
for (int i = ((int)[subviews count] - 1); i >= 0; i--) {
subview = [subviews objectAtIndex: i];
//NSLog(@"--->subview[%d] = %@", i, subview);
Expand Down
5 changes: 3 additions & 2 deletions www/MarkerCluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ MarkerCluster.prototype.remove = function (callback) {
});
self.trigger('remove');

var activeMarkerId = activeMarker ? activeMarker.getId() : null;
var activeMarkerId = activeMarker ? activeMarker.getId() : '';
activeMarkerId = activeMarkerId.replace(/^.+\-/, '');
var marker;
if (resolution === self.OUT_OF_RESOLUTION) {
Expand Down Expand Up @@ -566,7 +566,8 @@ Object.defineProperty(MarkerCluster.prototype, '_redraw', {

//console.log('---->548');
var activeMarker = self.map.get('active_marker');
var activeMarkerId = activeMarker ? activeMarker.getId() : null;
var activeMarkerId = activeMarker ? activeMarker.getId() : '';
activeMarkerId = activeMarkerId.replace(/^.+\-/, '');
if (prevResolution === self.OUT_OF_RESOLUTION) {
if (resolution === self.OUT_OF_RESOLUTION) {
//--------------------------------------
Expand Down

0 comments on commit 19f1772

Please sign in to comment.