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

Hide myLocationButton or set a custom one #267

Open
Lilian1997 opened this issue Feb 11, 2025 · 1 comment
Open

Hide myLocationButton or set a custom one #267

Lilian1997 opened this issue Feb 11, 2025 · 1 comment
Assignees

Comments

@Lilian1997
Copy link

I want to enable GoogleMapViewController.setMyLocationEnabled(true) on the map to display the blue location dot representing the current position.

At the same time, I want to hide the myLocationButton so that I can use a custom UI or adjust its position. By default, on Android, the button is in the top right, while on iOS, it is in the bottom right. I want to make the position consistent across platforms.

I noticed that Android supports this functionality.

I would like to ask if this package provides a similar setting for iOS as well?

@illuminati1911
Copy link
Contributor

Hey @Lilian1997

Our SDK has support for the setMyLocationButtonEnabled function for both iOS and Android. You can use it to hide the my location button. However, I believe you cannot use a custom button in this case because we do not have a function for triggering just the functionality itself (recentering map to users location) in the SDK. Also changing the location of the myLocationButton is not possible.

Maybe @jokerttu can double confirm that what I said here is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants