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

Customize My Location button #337

Open
Live4win opened this issue Nov 24, 2023 · 3 comments
Open

Customize My Location button #337

Live4win opened this issue Nov 24, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@Live4win
Copy link

Is there a way to customize the My Location button which appears on the map view's bottom right corner when MaplibreMap.myLocationEnabled is set to true? Or to create one from scratch which can interact with the map's location marker?

@m0nac0
Copy link
Collaborator

m0nac0 commented Nov 24, 2023

I don't think that the underlying MapLibre libraries we use offer the possibility to style that button.

@Live4win
Copy link
Author

Live4win commented Nov 27, 2023

I see. I also thougt that I could also make a button which uses the map's controller to turn on/off the 'my location' marker on the map without having the default button already displayed, but I don't see anything exposed on the controller which lets me do that. Is it possible to do it in the first place?

edit: added 'without having the default button already displayed'

@m0nac0
Copy link
Collaborator

m0nac0 commented Nov 27, 2023

I actually don't think that that's possible. If you find a way to do that with the maplibre native/JS libraries we could expose that functionality, but AFAIK (and as far as my quick research shows) it's not possible (though that doesn't have to mean it really isn't possible)

@josxha josxha added the enhancement New feature or request label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants