Skip to content

Map.setOptions()

wf9a5m75 edited this page Sep 19, 2014 · 9 revisions

Set the attributions of the map

###Description You can change the camera view and the UIs. This is useful when you want to show the specific location of the map. Available options are mapType, controls, gestures, and camera.


###Code

const GOOGLE = new plugin.google.maps.LatLng(37.422848, -122.085565);
map.moveCamera({
  'target': GOOGLE,
  'tilt': 60,
  'zoom': 18,
  'bearing': 140
});
$(":checkbox").off();
$(":checkbox").on("change", function() {
  var optName = $(this).attr("id").replace("chk_", "");
  var options = {
    controls: {}
  };
  options.controls[optName] = $(this).is(":checked");
  map.setOptions(options);
});

Join the official community

New versions will be announced through the official community. Stay tune!

Do you have a question or feature request?

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

Clone this wiki locally