diff --git a/README.md b/README.md index 268f3fff3..dd66aebfd 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cordova GoogleMaps plugin for Android, iOS and Browser v2.7.0 +# Cordova GoogleMaps plugin for Android, iOS and Browser v2.7.1 | Download | Build test (multiple_maps branch)| |----------|---------------------------| @@ -37,81 +37,11 @@ ## Quick install - - *Stable version(npm)* - ``` - $> cordova plugin add cordova-plugin-googlemaps - ``` - - - *Development version(beta version)* - ``` - $> cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps#multiple_maps - ``` - -## PhoneGap Build settings - - ```xml - - - - - - ``` - -## Install optional variables - - - ![](https://raw.githubusercontent.com/mapsplugin/cordova-plugin-googlemaps/master/images/icon-android.png) **PLAY_SERVICES_VERSION = (15.0.1)**
- The Google Play Services SDK version. - _You need to specify the same version number with all other plugins._ - Check out the latest version [here](https://developers.google.com/android/guides/releases). - - - ![](https://raw.githubusercontent.com/mapsplugin/cordova-plugin-googlemaps/master/images/icon-android.png) **ANDROID_SUPPORT_V4_VERSION = (27.1.1)**
- This plugin requires the Android support library v4. - _The minimum version is 24.1.0._ - Check out the latest version [here](https://developer.android.com/topic/libraries/support-library/revisions.html). - - - ![](https://raw.githubusercontent.com/mapsplugin/cordova-plugin-googlemaps/master/images/icon-ios.png) **LOCATION_WHEN_IN_USE_DESCRIPTION**
- This message is displayed when your application requests **LOCATION PERMISSION for only necessary times**. - - - ![](https://raw.githubusercontent.com/mapsplugin/cordova-plugin-googlemaps/master/images/icon-ios.png) **LOCATION_ALWAYS_USAGE_DESCRIPTION**
- This message is displayed when your application requests **LOCATION PERMISSION for always**. - ---------------------------------------------------------------------------------------------------------- - -## Browser platform - - We support browser platform now! - You can develop your application with browser, then run it! - At the end of development, you can upload the html files to your server, or run it on Android or iOS devices. - - ``` - $> cordova run browser - ``` - - If you use [ionic framework](https://ionicframework.com/), it supports `live-reload`. - - ``` - $> ionic cordova run browser -l - ``` - - If you want to use `live-reload`, but you don't want to use other framework or without framework, - [cordova-plugin-browsersync](https://www.npmjs.com/package/cordova-plugin-browsersync) is useful. - ``` - $> cordova plugin add cordova-plugin-browsersync - - $> cordova run (browser/android/ios) -- --live-reload + $> cordova plugin add cordova-plugin-googlemaps ``` - -### API key (Android and iOS platforms) - - As of v2.6.0, you need to specify your API keys in `config.xml` file instead of `--variable`. - This allows you to change your API keys for anytime without reinstallation. - - Please pay attention the variable names are changed. +Then set your Google Maps API keys into your `config.xml` (Android / iOS). ```xml @@ -120,11 +50,7 @@ ``` -### API key (Browser platform) - - In the browser platform, the maps plugin uses [Google Maps JavaScript API v3](https://developers.google.com/maps/documentation/javascript/) - - You need to set **two API keys for Google Maps JavaScript API v3**. +For browser platform, ```js // If your app runs this program on browser, @@ -136,7 +62,7 @@ // plugin.google.maps.environment.setEnv({ 'API_KEY_FOR_BROWSER_RELEASE': '(YOUR_API_KEY_IS_HERE)', - 'API_KEY_FOR_BROWSER_DEBUG': '' + 'API_KEY_FOR_BROWSER_DEBUG': '' // optional }); // Create a Google Maps native view under the map_canvas div. @@ -144,54 +70,36 @@ ``` -### Why **two API keys**? - - `JavaScript` code is `text code`. Even if you do obfuscation, it's still readable finally. - In order to protect your API key, you need to set `Key restriction` for these keys. - - ![](https://raw.githubusercontent.com/mapsplugin/cordova-plugin-googlemaps/master/images/api_key_restrictions.png) +## PhoneGap Build settings - If you don't set API key, the maps plugin still work with `development mode`. + ```xml + - ```js - plugin.google.maps.environment.setEnv({ - 'API_KEY_FOR_BROWSER_RELEASE': '(YOUR_API_KEY_IS_HERE)', - 'API_KEY_FOR_BROWSER_DEBUG': '' // If key is empty or unset, - // the maps plugin runs under the development mode. - }); + + + ``` - - -### Which browser supported? - - Modern browsers should work without any problem. - - ![](https://raw.githubusercontent.com/mapsplugin/cordova-plugin-googlemaps/master/images/modern_browsers.png) - - Internet Explorer 11 might work. We don't confirm all features, but basic features work. - -### Behavior differences - `Google Maps JavaScript API v3` is completely different ecosystem with `Google Maps Android API` and `Google Maps SDK for iOS`. +## Install optional variables (config.xml) - `Google Maps JavaScript API v3` : - - **can't** draw 3D building, - - **does't work** if offline, - - **can't** map rotation, - - etc... - - In the browser platform, the maps plugin works almost the same behaviors as native platforms(Android, and iOS), - but not exactly the same behaviors. - So don't expect too much. + - ![](https://raw.githubusercontent.com/mapsplugin/cordova-plugin-googlemaps/master/images/icon-android.png) **GOOGLE_MAPS_PLAY_SERVICES_VERSION = (16.0.1)**
+ The Google Play Services SDK version. + _You need to specify the same version number with all other plugins._ + Check out the latest version [here](https://developers.google.com/android/guides/releases). -### Touch mechanism difference + - ![](https://raw.githubusercontent.com/mapsplugin/cordova-plugin-googlemaps/master/images/icon-android.png) **ANDROID_SUPPORT_V4_VERSION = (27.1.1)**
+ This plugin requires the Android support library v4. + _The minimum version is 24.1.0._ + Check out the latest version [here](https://developer.android.com/topic/libraries/support-library/revisions.html). - As you may know, [this plugin displays native Google Maps view under the browser in Android and iOS](#how-does-this-plugin-work-android-ios). - However this plugin displays as `normal HTML element` in browser platform. + - ![](https://raw.githubusercontent.com/mapsplugin/cordova-plugin-googlemaps/master/images/icon-ios.png) **LOCATION_WHEN_IN_USE_DESCRIPTION**
+ This message is displayed when your application requests **LOCATION PERMISSION for only necessary times**. - Because of this, touch behavior is different. - The maps plugin does not hook the touch position, do not set `background: transparent`, ... etc. - But if you use this plugin as normal behavior, you don't need to consider about this. + - ![](https://raw.githubusercontent.com/mapsplugin/cordova-plugin-googlemaps/master/images/icon-ios.png) **LOCATION_ALWAYS_USAGE_DESCRIPTION**
+ This message is displayed when your application requests **LOCATION PERMISSION for always**. --------------------------------------------------------------------------------------------------------- @@ -204,8 +112,13 @@ --------------------------------------------------------------------------------------------------------- ## Release Notes + + - **v2.7.1** + - Fix: (iOS) UiWebView references present in v2.7.0 + - **v2.7.0** - Re-adoption: cordova-plugin-googlemaps-sdk dependency + - Important update: No longer support `UIWebView` on iOS. `WKWebView` only. - Fix: (iOS) Can't load image files from local host on ionic 4 / 5 - Update: (Android) prevent null pointer error in AsyncLoadImage.java - Fix: Css animation interference when call setDiv and there is a push/pop page @@ -225,22 +138,9 @@ - Remove promise-7.0.4-min.js.map - Fix: (iOS) bug fix: App crashes if "bearing" property is "" - Fix: HTMLColor2RGBA() converts to incorrect value - - Fix: (Android) Can't load marker image from the Ineternet - - - **v2.6.2** - - Fix: (Android) build error - - - **v2.6.1** - - Fix: (Android) Conflicting with `OneSignal-Cordova-SDK` - - Fix: (iOS) App crashes when marker url isn't valid. - - - **v2.6.0** - - Fix: Can not install to Cordova 9.0 project - - Fix: (Android) `ConcurrentModificationException` error at `onStop` - - Fix: (Android) Polygon becomes visible when you run `setPoints()` to invisible polygon - - Fix: (Android/iOS) TileOverlay does not work when your app runs on `file:` protocol with ionic. - - Update: (iOS) Specify the Google Maps SDK version as `=> 3.1.0`. Please use `cordova-ios@5.0.0` or above, otherwise modify `platform/ios/Podfile`. - - Add: (Android/iOS) API Key mechanism + - Fix: (Android) Can't load marker image from the Internet + - many bug fixes... + --------------------------------------------------------------------------------------------------------- diff --git a/package.json b/package.json index 6c03090e7..bc6c54e48 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-googlemaps", - "version": "2.7.0-20200330-2338", + "version": "2.7.1", "description": "Google Maps native SDK for Android and iOS, and Google Maps JavaScript API v3 for browser.", "cordova": { "id": "cordova-plugin-googlemaps", diff --git a/plugin.xml b/plugin.xml index 4d0024f79..1a2c801c5 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,5 +1,5 @@ - + cordova-plugin-googlemaps diff --git a/src/android/plugin/google/maps/PluginMarker.java b/src/android/plugin/google/maps/PluginMarker.java index 0c9f6f7a8..c639532ce 100644 --- a/src/android/plugin/google/maps/PluginMarker.java +++ b/src/android/plugin/google/maps/PluginMarker.java @@ -182,7 +182,7 @@ public void run() { if (!_clearDone) { semaphore.acquire(); } - } catch (InterruptedException ignore) { + } catch (Exception ignore) { } }