Deeplinking
Deeplinking keeps the map’s state in the page URL, so a particular view can be bookmarked, shared, or restored with the browser’s back and forward buttons.
How it works
Deeplinking is a two-way sync between the map and the URL’s query string:
- State → URL. When a visitor opens a location or applies a group filter, Mapplic updates the query string in place, without reloading the page.
- URL → state. When the map loads with those parameters present — or the visitor navigates back and forward — Mapplic reads them and restores the matching state.
Turn it on with the deeplinking setting.
Setting it to true enables location deeplinking; passing an array opts into specific
parameters.
Supported parameters
| Parameter | Example | Restores |
|---|---|---|
location | ?location=room-101 | Opens the location with that id. |
group | ?group=conference,meeting | Applies one or more group filters (comma-separated). |
A fully self-describing link looks like this:
https://your-site.com/map?location=cafeteria&group=foodOpening it focuses the cafeteria location and activates the food group filter.
deeplinking: true is shorthand for ['location']. To also sync group filters, use
the array form: deeplinking: ['location', 'group'].
Wayfinding routes
On maps with wayfinding enabled, routes can be restored from the
URL too. Opt in by adding the wayfinding key to the setting:
deeplinking: ['location', 'group', 'wayfinding']With it enabled, three parameters are read from the URL when the map loads:
| Parameter | Restores |
|---|---|
from | Route origin location id. |
to | Route destination location id. |
fixedfrom | Fixed route origin location id. |
Unlike location and group, the wayfinding parameters are one-way: they are read
from the URL on load but are not written back as the route changes. Use them to link
into a set of directions, not to capture live route state.
Notes
- Values are URL-encoded, and multiple groups are joined with commas.
- A parameter is removed from the URL when its state clears — closing a location drops
location, for example. - Deeplinking targets locations and groups by id, so stable ids make for stable links.
For the type behind the setting, see deeplinking under
Map interaction settings.