Beautiful Maps - Mapbox
  • Introduction
    • 👋Welcome
    • Key use cases
    • Key features
    • Demo apps
  • Getting Started
    • Registering for a Mapbox account
    • Install the plugin
    • Adding the access token
    • Adding a map to your app
  • Loading a Map
    • Selecting a default location
    • Setting zoom levels
    • Setting a map style
    • Adding controls to a map
  • Loading Markers
    • Structuring your database for markers
    • Adding multiple markers
    • Adding a single marker
    • Adding popups to markers
    • Using custom icons
    • Changing marker on hover
    • Removing markers from a map
    • Trigger an action when marker is clicked
  • Geolocation
    • Show the user's current location
  • Drawing Mode
    • Drawing shapes on a map
    • Saving drawings
    • Loading drawings
  • Route Navigation
    • Adding navigation
Powered by GitBook
On this page
  1. Geolocation

Show the user's current location

PreviousTrigger an action when marker is clickedNextDrawing shapes on a map

Last updated 3 months ago

You can show the current user's location on a Mapbox Map using a tracking beacon:

There are a number of ways you can activate the tracking beacon:

  • If you set the 'Geolocate' control on the Mapbox Map to 'yes', the user will have the opportunity to click it to start the geolocation

  • You can also trigger this automatically by setting the 'Trigger on Page Load' option to 'yes'

  • You can trigger the geolocation from a workflow action by using the 'Add Geolocation' action and setting the 'Trigger Automatically' field to 'yes'

Demo app

See the 'Locate the current user (geolocation)' section of the demo app for an example of how to implement geolocation:

Bubble - Visual ProgrammingBubble
Logo