Geocoding & Geolocation

Controls for making it easier for your user to locate places on the map.

Geocoder Control [Requires Mapbox access token]

Allows users to search for real-world locations and zoom to them quickly on selection.

  • Limit results by country code (use 2-letter country codes)

  • Limit results by bounds

  • Allow users to enter coordinates directly when searching for a place [Pro]

  • Modify the search placeholder text

  • Change the marker color automatically placed [Mapbox]

Geolocation Control

Allow users to quickly find themselves on the map by pressing a button.

  • Geolocate on map load [Pro]

  • Show a circle around the user point that represents accuracy of the geolocation [Pro]

  • Show user heading (direction the user's device is pointing) [Pro]

  • Track user location by updating the position automatically as the user moves [Pro]

  • Enable highest possibly accuracy of the user's device (browsers are less accurate than mobile devices)

Directions Control [Requires Mapbox access token]

Add a directions interface for entering start and end locations.

  • Change units between metric and imperial

  • Change default directions type between Driving/Traffic, Driving, Walking, Cycling

  • Change placeholder text

Last updated

Was this helpful?