Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[@capacitor/google-maps] Refactor options and extend a method to update the map options #1617

Closed
AE1NS opened this issue May 25, 2023 · 6 comments

Comments

@AE1NS
Copy link
Contributor

AE1NS commented May 25, 2023

Feature Request

Plugin

@capacitor/google-maps

Description

This feature request has 2 topics

Refactor options

  • As styles also exists in google.maps.MapOptions it could be removed from GoogleMapsConfig. I think you added it here, to show it in the documentation, but I would rather write a comment above the class, which properties from google.maps.MapOptions are supported
  • To prevent overhead, the MapType class could be deleted, because its documented in google.maps.MapOptions
  • The following methods could be removed and implemented within the options object (this would require to have a update method, see below):
    • getMapType
    • setMapType
    • enableIndoorMaps
    • enableTrafficLayer
    • enableAccessibilityElements
    • enableCurrentLocation
    • setPadding
  • There should be some additional options in GoogleMapsConfig like:
    • isCompassEnabled
    • isRotateGesturesEnabled
    • isTiltGesturesEnabled
    • isToolbarEnabled
    • isZoomGesturesEnabled
  • Some more properties of google.maps.MapOptions should 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

@djabif
Copy link

djabif commented Aug 28, 2023

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.

Screenshot 2023-08-27 at 22 05 53

@matbravob
Copy link

matbravob commented Sep 8, 2023

@djabif The "disableDefaultUI" is only available for web. For iOS and Android only the config options declared on GoogleMapConfig are available.

@ngmiduc
Copy link

ngmiduc commented Nov 10, 2023

Are there any updates on this?

@CSantosM
Copy link

Are there any uptades?

@AE1NS
Copy link
Contributor Author

AE1NS commented Jun 18, 2024

@AE1NS AE1NS closed this as completed Jun 18, 2024
Copy link

ionitron-bot bot commented Jul 3, 2024

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Jul 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
6 participants