Skip to content

Commit

Permalink
Remove: AsyncLicenseInfo.java (#1646)
Browse files Browse the repository at this point in the history
Because the getOpenSourceSoftwareLicenseInfo() was removed from Android
  • Loading branch information
wf9a5m75 committed Aug 16, 2017
1 parent 479cd74 commit 8a0a8c3
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 126 deletions.
133 changes: 73 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,90 +1,103 @@
Cordova GoogleMaps plugin for iOS and Android
==========================
This plugin is a thin wrapper for [Google Maps Android API](https://developers.google.com/maps/documentation/android/) and [Google Maps SDK for iOS](https://developers.google.com/maps/documentation/ios/).
Both [PhoneGap](http://phonegap.com/) and [Apache Cordova](http://cordova.apache.org/) are supported.

-----

### Quick install

Before you install, make sure you've read the [instructions](https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v1.4.0/Installation/README.md)

*npm (current stable 1.4.3)*
```bash
$> cordova plugin add cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE" --variable API_KEY_FOR_IOS="YOUR_IOS_API_KEY_IS_HERE"
```
*v1.4.3 is just small updates.

*Github (current master, potentially unstable)*
```bash
$> cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE" --variable API_KEY_FOR_IOS="YOUR_IOS_API_KEY_IS_HERE"
```

If you re-install the plugin, please always remove the plugin first, then remove the SDK
This plugin provides features of [Google Maps Android API](https://developers.google.com/maps/documentation/android/) and [Google Maps SDK for iOS](https://developers.google.com/maps/documentation/ios/).
Both [PhoneGap](http://phonegap.com/) and [Apache Cordova](http://cordova.apache.org/) are supported.

```bash
$> cordova plugin rm cordova-plugin-googlemaps
$> cordova plugin rm com.googlemaps.ios
$> cordova plugin add cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE" --variable API_KEY_FOR_IOS="YOUR_IOS_API_KEY_IS_HERE"
```
## How different between Google Maps JavaScript API v3?

The SDK-Plugin won't be uninstalled automatically and you will stuck on an old version.
This plugin displays the map view of native(Java and Objective-C) features, which is **faster** than Google Maps JavaScript API v3.

-----
And the native map view works even if the device is **offline**.

### Join the official community
New versions will be announced through the official community. Stay tuned!
This plugin provides the features of the native map view to JS developers.

<a href="https://plus.google.com/u/0/communities/117427728522929652853"><img src="https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v1.4.0/top/Red-signin_Google_base_44dp.png?raw=true" height="40"></a>
You can write your code `similar like` the Google Maps JavaScript API v3.

### Chat
Join our online chat at<br>
[![Gitter](https://badges.gitter.im/cordova-plugin-googlemaps.svg)](https://gitter.im/nightstomp/cordova-plugin-googlemaps)
## Quick demo

### Example
You can see an example here. **(old version, but all most the same)**
![](https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/raw/master/v1.4.0/top/demo.gif)

[phonegap-googlemaps-plugin-v1.2.5.apk](https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v1.4.0/top/phonegap-googlemaps-plugin-v1.2.5.apk)
```bash
$> adb install phonegap-googlemaps-plugin-v1.2.5.apk
```
```js
var map;
document.addEventListener("deviceready", function() {
var div = document.getElementById("map_canvas");

![](https://raw.githubusercontent.com/mapsplugin/cordova-plugin-googlemaps-doc/master/v1.4.0/top/example-v1.2.5.gif)
// Initialize the map view
map = plugin.google.maps.Map.getMap(div);

### Documentations
// Wait until the map is ready status.
map.addEventListener(plugin.google.maps.event.MAP_READY, onMapReady);
}, false);

All documentations are moved to https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v1.4.0/README.md
function onMapReady() {
var button = document.getElementById("button");
button.addEventListener("click", onBtnClicked);
}

-----
function onBtnClicked() {

// Move to the position with animation
map.animateCamera({
target: {lat: 37.422359, lng: -122.084344},
zoom: 17,
tilt: 60,
bearing: 140,
duration: 5000
}, function() {

### Version 2.0 Beta
// Add a maker
map.addMarker({
position: {lat: 37.422359, lng: -122.084344},
title: "Welecome to \n" +
"Cordova GoogleMaps plugin for iOS and Android",
snippet: "This plugin is awesome!",
animation: plugin.google.maps.Animation.BOUNCE
}, function(marker) {

The new version 2.0 supports multiple maps on multiple pages.
Lots of issues are fixed, and the performance are improved.
// Show the info window
marker.showInfoWindow();

However, the documentation is not enough for the version 2.0.
For the reason, the new version is still in the beta.
If you are interested in it, you can try the new version.
// Catch the click event
marker.on(plugin.google.maps.event.INFO_CLICK, function() {

For more details, please read here.
https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/README.md
// To do something...
alert("Hello world!");

You can try the demo application from here.
});
});
});
}
```


https://github.com/mapsplugin/v2.0-demo
## Versioning

![](https://github.com/mapsplugin/v2.0-demo/raw/master/image.gif)
There are two versions:

-----
- v1.4.4
Only one map is available in your app. Stable, but no more development. Only critical bug fixes.
- [Documentation for v1.4.4](https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v1.4.0/README.md)


### Version 2.0 Beta Roadmap
- v2.0-beta3
Multiple maps in your app is available. Mostly stable, but still developing.
- [Documentation for v2.0-beta3](https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/README.md)
- [Demo](https://github.com/mapsplugin/v2.0-demo)
- [Release notes](https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/ReleaseNotes/v2.0-beta3/README.md)

The version 1.x will be shutdown in 2017.
The date is not decided yet, but we release the v1.4.3 is the last version of v1.x
<table>
<tr>
<th>v1.4.4</th>
<th>v2.0-beta3</th>
</tr>
<tr>
<td><img src="https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/raw/master/v1.4.0/top/demo.gif" width="250"></td>
<td><img src="https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/images/v2demo.gif?raw=true" width="250"></td>
</tr>
</table>

For more details are announced through the [Official community](https://plus.google.com/u/0/communities/117427728522929652853)
I recommended you to use the **v2.0-beta3**.

![](https://github.com/mapsplugin/cordova-plugin-googlemaps/blob/master/roadmap.png?raw=true)
However if you want to use `map.addKmlOverlay()` or `you don't want to update the plugin frequently`,
please use the **v1.4.4**.
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": "1.4.3",
"version": "1.4.4",
"description": "Google Maps native SDK for Android and iOS",
"cordova": {
"id": "cordova-plugin-googlemaps",
Expand Down
1 change: 0 additions & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
<framework src="com.google.android.gms:play-services-location:11.+" />

<!-- plugin src files -->
<source-file src="src/android/plugin/google/maps/AsyncLicenseInfo.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/AsyncKmlParser.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/AsyncLoadImage.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/AsyncLoadImageInterface.java" target-dir="src/plugin/google/maps" />
Expand Down
62 changes: 0 additions & 62 deletions src/android/plugin/google/maps/AsyncLicenseInfo.java

This file was deleted.

3 changes: 1 addition & 2 deletions src/android/plugin/google/maps/GoogleMaps.java
Original file line number Diff line number Diff line change
Expand Up @@ -714,8 +714,7 @@ private void loadPlugin(String serviceName) {

@SuppressWarnings("unused")
private Boolean getLicenseInfo(JSONArray args, CallbackContext callbackContext) {
String msg = GooglePlayServicesUtil.getOpenSourceSoftwareLicenseInfo(activity);
callbackContext.success(msg);
callbackContext.success();
return true;
}

Expand Down

0 comments on commit 8a0a8c3

Please sign in to comment.