Disable auto-zoom of GeolocateControl
on trigger
#2326
Unanswered
HelNershingThapa
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Using the
trigger
function fromGeolocateControl
automatically triggers a zoom to the user's location. I want to disable this auto-zoom feature while still being able to geolocate the user.What I've Tried:
I found a workaround that involves disabling the
_updateCamera
function. Here's the code snippet I'm using:However, this approach has an unintended consequence. While it prevents the auto-zoom on the component mount, it also disables the zoom when the user manually clicks the geolocate control button.
Beta Was this translation helpful? Give feedback.
All reactions