Open on Marker
Use a custom query string to open your map directly on a specific marker.
Last updated
Use a custom query string to open your map directly on a specific marker.
Last updated
With this functionality, you can cause your map to open directly onto a specific marker when loaded. This might be useful if you want to have a lot of features on a map, but you still want users to be oriented to a specific marker or feature when the map loads.
To use this feature, you don't need to change any settings in your map. Instead, you need to modify the URL that you provide to users or use for your links.
You can see an example of the form of the URL at our example site:
https://wpmaps.mapster.me/examples/mapster-wp-map/printing-map/?map_id=914&marker_id=705
The usual URL for this map is as follows:
https://wpmaps.mapster.me/examples/mapster-wp-map/printing-map/
So you can see that we add a query string to the URL.
This query string is in the form:
/map_id=<map_id>&marker_id=<marker_id>
Even if there's only one map on the page, you have to specify the map_id. You can find this on the Maps page in the Wordpress admin:
And you can find the particular ID for a given Location (marker) on the Locations admin page:
Using these two pieces of information, you just add the query string to the end of your URL, and from then on you can provide that URL to users and it will open on the specific marker you specified! It will also automatically open any popup associated with that point.