Query Parameters
Why use Query Parameters?
The Map Template supports using query parameters for all the properties provided by the MapsIndoorsMap
component.
The supported query parameters are the following:
apiKey
- Used like thisapiKey=yourApiKey
. If no apiKey is provided, the app will default tomapspeople3d
.venue
- Used like thisvenue=yourVenueName
. If no venue is provided, the app will select the first venue from the solution in alphabetical order.locationId
- Used like thislocationId=yourLocationId
primaryColor
- Used like thisprimaryColor=000000
. Note! You need to provide a hex color value, without the#
, due to the hashtag being a reserved symbol that has a predefined purpose in a query string. If no primary color is provided, the app will default to the MapsPeople brand color.logo
- Used like thislogo=https://images.g2crowd.com/uploads/product/image/social_landscape/social_landscape_7a75ff13f42605422950b411ab7e03b5/mapspeople.png
. Use an image address to provide a different logo on the loading screen. If no logo is provided, the app will default to the MapsPeople icon.appUserRoles
- Used like thisappUserRoles=visitor,staff,security
. Note! You need to provide a list of comma separated values, without any spaces between the comma and the value. This will further be converted into an array of appUserRoles.directionsFrom
- Used like thisdirectionsFrom=yourOriginLocationId
.directionsTo
- Used like thisdirectionsTo=yourDestinationLocationId
.externalIDs
- Used like thisexternalIDs=0.0.1,0.0.2,0.0.3
. Note! You need to provide a list of comma separated values, without any spaces between the comma and the value. This will further be converted into an array of external IDs. Because of the way browsers work, you cannot use External IDs with the,
,&
,#
and+
, character in them, as they are interpreted by the browser in a particular way.tileStyle
- Used like thistileStyle=yourTileStyleName
. If no tile style is provided, the app will show the default tile style.mapboxAccessToken
- Used like thismapboxAccessToken=yourMapboxAccessToken
. If no mapboxAccessToken is provided, the app will default to the access token in the.env
file. If both the mapboxAccessToken and the gmApiKey are present, the app will load a Mapbox map.gmApiKey
- Used like thisgmApiKey=yourGmApiKey
. If no gmApiKey is provided, the app will default to the access token in the.env
file. If both the mapboxAccessToken and the gmApiKey are present, the app will load a Mapbox map.startZoomLevel
- Used like thisstartZoomLevel=22
.gmMapId
- Used like thisgmMapId=yourGmMapId
.pitch
- Used like thispitch=30
. Not compatible with MapsIndoors 2D models and MapsIndoors labels on Google Maps. The value of the pitch can be between 0-85 degrees on a Mapbox map.bearing
- Used like thisbearing=180
. Not compatible with MapsIndoors 2D models and MapsIndoors labels on Google Maps. It accepts any value, and will modify it to fit into the range [0, 360].language
- The language to show textual content in. Supported values are "en" for English, "da" for Danish, "de" for German, "fr" for French, "it" for Italian, "nl" for Dutch and "es" for Spanish. If the prop is not set, the language of the browser will be used (if it is one of the supported languages - otherwise it will default to English).kioskOriginLocationId
- If running the Map Template as a Kiosk, provide the Location ID that represents the location of the Kiosk.timeout
- If you want the Map Template to reset the map position and the UI elements to the initial state after some time of inactivity, use this to specify the number of seconds of inactivity before resetting. This property is not dependent on thekioskOriginLocationId
.useKeyboard
- If running the Map Template as a Kiosk, set this prop totrue
and it will prompt a virtual keyboard. This property is dependent on thekioskOriginLocationId
.miTransitionLevel
- The zoom level on which to transition from Mapbox to MapsIndoors data. Default value is 17. This feature is only available for Mapbox.category
- If you want to indicate an active category on the map. The value should be the Key (Administrative ID).searchAllVenues
- If you want to perform search across all venues in the solution. The standard behaviour is searching in one venue.useMapProviderModule
- Set to "true" if the Map Template should take MapsIndoors solution modules into consideration when determining what map type to use.hideNonMatches
- Determine whether the locations on the map should be filtered (only show the matched locations and hide the rest) or highlighted (show all locations and highlight the matched ones with a red dot by default). If set to true, the locations will be filtered.showRoadNames
- A boolean parameter that dictates whether Mapbox road names should be shown. By default, Mapbox road names are hidden when MapsIndoors data is shown. It is dictated bymi-transition-level
which default value is 17.showExternalIDs
- Determine whether the Location details should show the external ID or not. The default value is set to false.searchExternalLocations
- If you want to perform search for external locations in the Wayfinding mode. If set to true, Mapbox/Google places will be displayed depending on the Map Provider you are using. If set to false, the results returned will only be MapsIndoors results. The default is true.
Note! All the query parameters need to be separated with the &
symbol, without any spaces in between.
Note! When using parameters such as directionsTo
, directionsFrom
, locationId
, externalIDs
, and tileStyle
make sure you are using the correct apiKey
parameter to which they belong.
Note! When using the gmMapId
property, you need to use it together with the gmApiKey
that it is associated with.
Example of URL:
https://domain.com/?apiKey=yourApiKey&venue=yourVenueName&locationId=yourLocationId&primaryColor=000000&logo=https://images.g2crowd.com/uploads/product/image/social_landscape/social_landscape_7a75ff13f42605422950b411ab7e03b5/mapspeople.png&appUserRoles=visitor,staff,security
Important! Not all the query parameters can be used together, as they serve their own purpose which in some cases overlaps with other query parameters. Example of cases that DO NOT work together:
locationId
+startZoomLevel
→ thelocationId
has priority over thestartZoomLevel
locationId
+externalIDs
→ thelocationId
has priority over theexternalIDs
directionsTo
+directionsFrom
+locationId
→ thedirectionsTo
+directionsFrom
have priority over thelocationId
directionsTo
+directionsFrom
+externalIDs
→ thedirectionsTo
+directionsFrom
have priority over theexternalIDs
Last updated