[@capacitor/google-maps] Refactor options and extend a method to update the map options
Feature Request
Plugin
@capacitor/google-maps
Description
This feature request has 2 topics
Refactor options
- As styles also exists in
google.maps.MapOptionsit could be removed fromGoogleMapsConfig. I think you added it here, to show it in the documentation, but I would rather write a comment above the class, which properties fromgoogle.maps.MapOptionsare supported - To prevent overhead, the
MapTypeclass could be deleted, because its documented ingoogle.maps.MapOptions - The following methods could be removed and implemented within the options object (this would require to have a
updatemethod, see below):- getMapType
- setMapType
- enableIndoorMaps
- enableTrafficLayer
- enableAccessibilityElements
- enableCurrentLocation
- setPadding
- There should be some additional options in
GoogleMapsConfiglike:- isCompassEnabled
- isRotateGesturesEnabled
- isTiltGesturesEnabled
- isToolbarEnabled
- isZoomGesturesEnabled
- Some more properties of
google.maps.MapOptionsshould be handled by the native code like:- gestureHandling
- restriction
Add an update method for map options
The above defined changes should also be appliable by an update method, to change them after the map instantiation.
Platform(s)
Android iOS Web
Adding to this issue, I think it would be really nice to be able to update the map options as @AE1NS suggests.
In my case I need to set setMyLocationButtonEnabled to false.
My problem is that if I set enableCurrentLocation to true, on Android the default geolocation button is shown, even if I set disableDefaultUI: true in the map config options. On iOS it works fine.
@djabif The "disableDefaultUI" is only available for web. For iOS and Android only the config options declared on GoogleMapConfig are available.
Are there any updates on this?
Are there any uptades?
Moved https://github.com/ionic-team/capacitor-google-maps/issues/25
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out.