platform-guideline 2 linked patterns checked
Mapbox GL JS: GeolocateControl
Documents a geolocation control that uses the browser geolocation API to locate the user on the map.
Read with a purpose
What this source can teach
Use this source to understand a platform convention and the setting it was designed for.
- Start with the original. Open the source and find the guidance or example relevant to your task.
- Trace the connection. Use the claim notes below to see how this site applies the source to specific patterns.
- Check the setting. Compare the source's platform, people, and constraints with your own decision.
Pattern Decisions This Source Supports
| Pattern | Supported decision | Required contract | Claim note |
|---|---|---|---|
| Location permission flow | Choose location permission flow when current device coordinates are the central interaction and the task needs permission timing, precision, grant or denial recovery, and location lifecycle states. | The native browser or OS prompt appears only after users understand why location is needed and choose a location-dependent action. | Supports map-adjacent current-location controls, tracking, and disabled location states. |
| Map view | Choose Map view when spatial relationship, proximity, coverage, route, region, or real-world placement changes the user's decision. | Markers, shapes, routes, clusters, and overlays represent explicit coordinates, features, or geographic areas, not decorative positions. | Mapbox documents a geolocation control based on the browser geolocation API. |
Comparisons supported by this source
- Location permission flow vs permission request vs map view vs address entry vs privacy settings vs offline state
Supports current-location controls, tracking states, and map-adjacent geolocation behavior.
Evidence Role
This source is treated as platform-guideline evidence. Its value comes from the specific claims and setting described above.
Publisher: Mapbox. Last checked: .