Skip to content

Commit 0470256

Browse files
andrewharveymourner
authored andcommitted
clarify GeolocateControl interaction states
1 parent c75bda6 commit 0470256

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/ui/control/geolocate_control.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,12 @@ let noTimeout = false;
7070
*
7171
* The zoom level applied will depend on the accuracy of the geolocation provided by the device.
7272
*
73-
* The GeolocateControl has two modes. If `trackUserLocation` is `false` (default) the control acts as a button, which when pressed will set the map's camera to target the user location. If the user moves, the map won't update. This is most suited for the desktop. If `trackUserLocation` is `true` the control acts as a toggle button that when active the user's location is actively monitored for changes. In this mode the GeolocateControl has three states:
74-
* * active - the map's camera automatically updates as the user's location changes, keeping the location dot in the center.
75-
* * passive - the user's location dot automatically updates, but the map's camera does not.
76-
* * disabled
73+
* The GeolocateControl has two modes. If `trackUserLocation` is `false` (default) the control acts as a button, which when pressed will set the map's camera to target the user location. If the user moves, the map won't update. This is most suited for the desktop. If `trackUserLocation` is `true` the control acts as a toggle button that when active the user's location is actively monitored for changes. In this mode the GeolocateControl has three interaction states:
74+
* * active - the map's camera automatically updates as the user's location changes, keeping the location dot in the center. Initial state and upon clicking the `GeolocateControl` button.
75+
* * passive - the user's location dot automatically updates, but the map's camera does not. Occurs upon the user initiating a map movement.
76+
* * disabled - occurs if Geolocation is not available, disabled or denied.
77+
*
78+
* These interaction states can't be controlled programmatically, rather they are set based on user interactions.
7779
*
7880
* @implements {IControl}
7981
* @param {Object} [options]

0 commit comments

Comments
 (0)