Skip to content

URL parameters

F.Moser edited this page Sep 5, 2023 · 26 revisions

MapX list of url parameters

closePanels

/**
* Closes all panels upon initialization.
* 
* @param {Boolean|String} true|false.
* @example `app.mapx.org?closePanels=true`
*/

showProjectsListByRole

/**
* Displays a modal dialog at the start of a session with projects filtered by role.
*
* @param {string} One of ['any', 'member', 'publisher', 'admin'].
* @example `app.mapx.org?showProjectsListByRole=member`
*/

showProjectsListByTitle

/**
* Displays a modal dialog at the start of a session with projects filtered by title.
*
* @param {string} Project title in English.
* @example `app.mapx.org?showProjectsListByTitle=WESR*`
*/

project

/**
* Loads a specific project page in MapX. If unspecified, MapX defaults to loading the "World" project page or the last project viewed by the logged-in user.
*
* @param {string} Project ID.
* @example `app.mapx.org?project=YYY`
*/

views

/**
* Filters the views in the panel by ID. Supports multiple IDs. The "project" parameter must be specified.
*
* @param {string} IDs of one or multiple views, separated by a comma.
* @example `app.mapx.org?project=YYY&views=XXX`
*/

viewsListFilterActivated

/**
* Hides views other than those specified in `views`. Has the same effect as if the "Filter Activated Views" button was active.
*
* @param {boolean} true|false
* @example `app.mapx.org?project=YYY&views=XXX&viewsListFilterActivated=true`
*/

viewsListFlatMode

/**
* Lists views outside of any category tree structure. All views are displayed at the base level.
*
* @param {boolean} true|false
* @example `app.mapx.org?project=YYY&views=XXX&viewsListFlatMode=true`
*/

zoomToViews

/**
* Automatically zooms to the extent of the specified views after loading.
*
* @param {boolean} true|false
* @example `app.mapx.org?project=YYY&views=XXX&zoomToViews=true`
*/

lockProject

/**
* Disables the projects button, preventing users from changing projects within the MapX page. Requires the "project" parameter to be specified.
*
* @param {Boolean|String} true|false
* @example `app.mapx.org?lockProject=true`
*/

noViews

/**
* Loads a MapX project without displaying any views on the views panel. This parameter takes precedence over any filtering parameters like "collections", "collectionsSelectOperator", or "views". The "project" parameter must be specified.
* 
* @param {Boolean|String} true|false
* @example `app.mapx.org?noViews=true`
*/

storyAutoStart

/**
* Automatically starts a specified story map without the usual interface.
* 
* @param {Boolean|String} true|false. Must be associated with the "views" parameter, which should only specify one view of the story map type.
* @example `app.mapx.org?views=XXX&storyAutoStart=true`
*/

lat

/**
* Sets the latitude for the map's center when MapX loads (in EPSG:4326). Overrides any default spatial parameters tied to a project for the current session.
* 
* @param {numeric} Latitude value; min: -90, max: 90. All spatial parameters (lat, lng, zoom) must be specified in the URL, or none will be used.
* @example `https://app.mapx.org?lat=-9.52&lng=18.41&zoom=6`
*/

lng

/**
* Sets the longitude for the map's center when MapX loads (in EPSG:4326). Overrides any default spatial parameters tied to a project for the current session.
* 
* @param {numeric} Longitude value; min: -180, max: 180. All spatial parameters (lat, lng, zoom) must be specified in the URL, or none will be used.
* @example `https://app.mapx.org/?lat=-9.52&lng=18.41&zoom=6`
*/

zoom

/**
* Sets the map's zoom level when MapX loads. Overrides any default spatial parameters tied to a project for the current session.
* 
* @param {numeric} Zoom level; min: 0, max: 22. All spatial parameters (lat, lng, zoom) must be specified in the URL, or none will be used.
* @example `https://app.mapx.org/?lat=-9.52&lng=18.41&zoom=6`
*/

zoomMin

/**
* Sets the minimum zoom level for the session.
* 
* @param {numeric} Zoom level; min: 0, max: 22
* @example `https://app.mapx.org/?zoomMin=10`
*/

zoomMax

/**
* Sets the maximum zoom level for the session.
* 
* @param {numeric} Zoom level; min: 0, max: 22
* @example `https://app.mapx.org/?zoomMax=10`
*/

action

/**
* Internal method for passing encrypted actions.
*
* @param {string} Encrypted string
* @example `app.mapx.org?action=xxxxx`
*/

language

/**
* Loads MapX in a specified language. Content unavailable in the chosen language defaults to English.
*
* @param {string} A 2-character code among "en", "fr", "es", "de", "ru", "fa", "ps", "bn", "zh".
* @example `app.mapx.org/?language=fr`
*/

useMaxBounds

/**
* Restricts map movement based on the current project bounding box or using n,e,s,w parameters.
* 
* @param {Boolean} true|false
* @example `app.mapx.org?useMaxBounds=false`
*/

globe

/**
* Enables globe mode.
* 
* @param {Boolean} true|false
* @example `app.mapx.org?globe=false`
*/

panels

/**
* Specifies panel states upon load through a URL configuration. 
* The configuration is a JSON string that defines the state of each panel by its ID.
* 
* @param {string} JSON string representing panel configuration.
* @example `app.mapx.org?panels={"controls_panel":{"open":false}}`
*/