🗺️
Mapster WP Maps
HomeProExamplesContact
  • Getting Started
    • About
    • Installation
    • Key Concepts
    • Importing/Exporting
    • Guides
      • Your First Map
      • Creating a Crowdsourced Map
      • Set Up Recurring Import
      • Adding a Custom Style
      • Building a Custom Popup
  • Creating Shapes
  • Displaying Maps
  • Maps
    • Map Tiles
    • Initial View
      • Fit to Features
      • Manual Values
      • User Location
    • Map Size
    • Points, Lines, Polygons
    • Clustering
    • Interactivity
    • Controls
      • Basic Controls
      • Geocoding & Geolocation
      • Togglers
      • Other Controls
      • Control Render Order
    • Filters
      • Category Filter
      • Custom Search Filter
      • Filter Dropdown
    • Lists
      • Store Locator
    • Specialty Maps
      • Map Comparer
      • Heatmaps
      • Elevation Profile
      • User Submission
      • Listing Page Map
    • Preloader
    • Developer
      • Javascript
      • Embedding Maps
      • Faster Loading (Cache)
      • Caching
      • Progressive Loading
      • Query String Control
  • Locations
    • Markers
    • Circles
    • Labels
    • Icons
    • 3D Models
  • Lines
    • Lines
  • Multi Lines
  • Polygons
    • Flat Polygons
    • 3D Polygons
    • Image Polygons
  • Multi Polygons
  • Popups
    • Popup Templates
      • Introduction
      • Layout, Colors, Text, CSS
      • HTML
      • Options
    • Popup Content
  • Pro Sections
    • User Submission
      • Overview
      • Submission Interface
      • Adding Custom Fields
      • Submission Admin
  • Mass Edit
  • Settings
    • General
    • Account Management
  • Advanced
  • Import
  • Tileset Management
  • Developer
    • Mapster Map ACF Field
    • Mapster Map Gravity Forms Field
    • Custom Scripts
    • Hooks
    • Spatial DB & API
    • Internationalization
Powered by GitBook
On this page

Was this helpful?

  1. Maps
  2. Developer

Query String Control

Use a custom query string to open your map directly on a specific marker.

PreviousProgressive LoadingNextMarkers

Last updated 8 days ago

Was this helpful?

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:

The usual URL for this map is as follows:

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.

https://wpmaps.mapster.me/examples/mapster-wp-map/printing-map/?map_id=914&marker_id=705
https://wpmaps.mapster.me/examples/mapster-wp-map/printing-map/