> For the complete documentation index, see [llms.txt](https://wpmaps-docs.mapster.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wpmaps-docs.mapster.me/maps/controls/geocoding-and-geolocation.md).

# Geocoding & Geolocation

### Geocoder Control <sup><sub>*<mark style="color:blue;">\[Requires Mapbox access token]</mark>*<sub></sup>

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

* **Limit results** by country code (use [2-letter country codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2))
* **Limit results** by bounds
* **Allow users to enter coordinates** directly when searching for a place <sup><sub>*<mark style="color:green;">\[Pro]</mark>*<sub></sup>
* **Modify the search placeholder text**
* **Change the marker color** automatically placed <sup><sub>*<mark style="color:blue;">\[Mapbox]</mark>*<sub></sup>

### Geolocation Control

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

* **Geolocate on map load** <sup><sub>*<mark style="color:green;">\[Pro]</mark>*<sub></sup>&#x20;
* **Show a circle around the user point** that represents accuracy of the geolocation <sup><sub>*<mark style="color:green;">\[Pro]</mark>*<sub></sup>
* **Show user heading** (direction the user's device is pointing) <sup><sub>*<mark style="color:green;">\[Pro]</mark>*<sub></sup>
* **Track user location** by updating the position automatically as the user moves <sup><sub>*<mark style="color:green;">\[Pro]</mark>*<sub></sup>
* **Enable highest possibly accuracy** of the user's device (browsers are less accurate than mobile devices)

### Directions Control <sup><sub>*<mark style="color:blue;">\[Requires Mapbox access token]</mark>*<sub></sup>

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**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wpmaps-docs.mapster.me/maps/controls/geocoding-and-geolocation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
