Toggle visibility of single markers in the map

If you want to display only one marker at a time, you can use some custom JS to hide all markers and display only one at a time and toggle between them using the list or dropdown feature.

To achieve this you can add the following code to your map, changing the ID of your map and the name of the marker you want to use by default.

Set active region based on URL hash

The map above will react to the hashtag added to the URL when loaded. Try the following links for example:

They will open in a new tab for the purpose of this example.

You’ll see that with the #europe in the URL, the map will automatically display with that region selected. This is done with a custom Javascript snippet to get the hash once the map is ready and set the selection on the map to match the hash, based on the available public methods the plugin provides.

The custom javascript can be found here: