-
Notifications
You must be signed in to change notification settings - Fork 916
Migrate from v1 to v2
This page will update without announce during in beta. Please check periodically
Several methods are renamed in v2. Please rewrite your code.
v1 | v2 |
---|---|
map.setCenter() | map.setCameraTarget() |
map.setZoom() | map.setCameraZoom() |
map.setBearing() | map.setCameraBearing() |
map.setTilt() | map.setCameraTilt() |
map.getCenter() | map.getCameraTarget() |
map.getZoom() | map.getCameraZoom() |
map.getBearing() | map.getCameraBearing() |
map.getTilt() | map.getCameraTilt() |
map.setBackgroundColor() | Environent.setBackgroundColor() |
These methods are not implemented yet because of deprecated considering or technically hard work is needed.
v1 | v2 |
---|---|
map.showDialog() | Deprecated considering |
map.closeDialog() | Deprecated considering |
map.setDebuggable() | technically not ready yet |
map.refreshLayout() | Actually implemented, but you don't need to use this anymore. Instead of this method, trigger the touch_start event. |
map.addKmlOverlay() | technically not ready yet |
event name | Androide | iOS |
---|---|---|
MAP_CLICK | YES | YES |
MAP_LONG_CLICK | YES | YES |
MY_LOCATION_CHANGE | YES | NO |
MY_LOCATION_BUTTON_CLICK | YES | YES |
INDOOR_BUILDING_FOCUSED | YES | YES |
INDOOR_LEVEL_ACTIVATED | YES | YES |
CAMERA_CHANGE | YES | YES |
CAMERA_IDLE | NO | YES |
MAP_READY | YES | YES |
MAP_LOADED | YES | NO |
MAP_WILL_MOVE | NO | YES |
MAP_CLOSE | YES | YES |
OVERLAY_CLICK | YES | YES |
INFO_CLICK | YES | YES |
MARKER_DRAG | YES | YES |
MARKER_DRAG_START | YES | YES |
MARKER_DRAG_END | YES | YES |
event name | Androide | iOS | arguments[0] |
---|---|---|---|
MAP_READY | YES | YES | none |
MAP_CLICK | YES | YES | LatLng |
MAP_LONG_CLICK | YES | YES | LatLng |
MY_LOCATION_BUTTON_CLICK | YES | YES | none |
INDOOR_BUILDING_FOCUSED | YES | YES | none |
INDOOR_LEVEL_ACTIVATED | YES | YES | building information |
CAMERA_MOVE_START | YES | YES | true if the camera move start by gesture |
CAMERA_MOVE | YES | YES | CameraPosition |
CAMERA_MOVE_END | YES | YES | CameraPosition |
POLYGON_CLICK | YES | YES | LatLng(clicked position) |
POLYLINE_CLICK | YES | YES | LatLng(clicked position) |
CIRCLE_CLICK | YES | YES | LatLng(clicked position) |
GROUND_OVERLAY_CLICK | YES | YES | LatLng(clicked position) |
INFO_CLICK | YES | YES | LatLng(marker position) |
INFO_LONG_CLICK | YES | YES | LatLng(marker position) |
INFO_CLOSE | YES | YES | LatLng(marker position) |
INFO_OPEN | YES | YES | LatLng(marker position) |
MARKER_CLICK | YES | YES | LatLng(marker position) |
MARKER_DRAG | YES | YES | LatLng(marker position) |
MARKER_DRAG_START | YES | YES | LatLng(marker position) |
MARKER_DRAG_END | YES | YES | LatLng(marker position) |
The plugin version 2 does not support the xxxClicked
properties anymore.
Please use addEventListener() or on()
methods instead.
// version 1
map.addMarker({
position: ...
markerClick: function(marker) {
marker.showInfoWindow();
}
});
// version 2
map.addMarker({
position: ...
}, function(marker) {
map.addEventListener(plugin.google.maps.event.MARKER_CLICK, function() {
map.showInfoWindow();
});
});
If you get an error, feel free to ask me on the official community or the issue list.
New version 2.0-beta2 is available.
The cordova-googlemaps-plugin v2.0 has more faster, more features.
https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/tree/master/v2.0.0/README.md
New versions will be announced through the official community. Stay tune!
Feel free to ask me on the issues tracker.
Or on the official community is also welcome!
New version 2.0-beta2 is available.
The cordova-googlemaps-plugin v2.0 has more faster, more features.
https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/tree/master/v2.0.0/README.md