Using GET variables to Control your Map

 (Linking to a marker from another page)

 

This article covers Linking to a Marker from Another Page with the WP Google Maps Pro Add-on. This feature requires WP Google Maps Pro. This documentation is current for WP Google Maps version 6.

 

If you’d like to link to one of your Maps, centered on a specific Marker, from another web page you can use GET variables in a link to call and control your Map. When loaded, the map will center on that marker’s location and the zoom level will be changed if you set that variable as well. Note that the receiving page must include a Map (can be either a shortcode or a widget). 

 

 

To create your link you’ll need the Marker ID for the marker you  want to be centered on the Map. You can find the Marker ID by opening the Map containing the Marker in the Create Your Map panel. (WordPress Dashboard → Maps → Maps → Edit).

 

On the Create Your Map panel, scroll down to your list of Markers and find the Marker ID you need.

 

Now that you have your Marker ID, you can create the link to open the Map.

 

Usage example:
http://www.yoursite.com/test-get-variables/?markerid=83&mzoom=12

 

Map Called with GET Variables

 

The following GET variables can be assigned:

  • markerid: The ID of the marker. This can be found in the marker listing within the map editor page (first column). Once set, the map will automatically centre on this marker’s location and the infowindow will open.
  • mzoom: The zoom level (0 – 21). Once set, the map will zoom to this level.

 


 

This article covered Linking to a Marker from Another Page with the WP Google Maps Pro Add-on. If you need further assistance, feel free to post on our Support Forums or visit our Support Desk.

 

Was this article helpful to you?