Several methods have been renamed in v2. Please rewrite your code accordingly.
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 have not been implemented yet, because of deprecated considering or technically hard work is required.
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 plugin_touch 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) |
Version 2 does not support 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) {
marker.addEventListener(plugin.google.maps.event.MARKER_CLICK, function() {
marker.showInfoWindow();
});
});
In version 2 the two methods LatLng.toUrlValue(precision) and LatLng.toString(), no longer return a string in the format of "lat,lng" like Google Maps JS API, but a stringified JSON value.
// v1
var strLatlng = latLng.toUrlValue();
// equivalent in v2
var strLatlng= latLng.lat + "," + latLng.lng;