@mapsindoors/map-template 1.99.34 → 1.99.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -44,7 +44,7 @@ const mapsIndoorsMapElement = document.querySelector('mapsindoors-map')
44
44
  mapsIndoorsMapElement.externalIDs = externalIDsArray;
45
45
  ```
46
46
 
47
- Use query parameters to configure the Web Component by setting the `supports-url-parameter` attribute to `true`.
47
+ Use query parameters to configure the Web Component by setting the `supports-url-parameters` attribute to `true`.
48
48
 
49
49
  ## Using just the browser
50
50
 
@@ -78,7 +78,7 @@ Use query parameters to configure the Web Component by setting the `supports-url
78
78
  ```
79
79
 
80
80
  Add attributes to the Web Component as needed (see supported properties below).
81
- Use query parameters to configure the Web Component by setting the `supports-url-parameter` attribute to `true`.
81
+ Use query parameters to configure the Web Component by setting the `supports-url-parameters` attribute to `true`.
82
82
 
83
83
  ## React component: Installation and usage
84
84
 
@@ -122,7 +122,7 @@ Note that when using the React component, the properties should conform to JSX p
122
122
  |`app-user-roles`|`appUserRoles`|`array`|A list of App User Roles to apply when loading data. Used like so: `appUserRoles={["App User Role"]}`|
123
123
  |`directions-from`|`directionsFrom`|`string`|Set a MapsIndoors Location ID to be used as origin to instantly show directions. |
124
124
  |`directions-to`|`directionsTo`|`string`|Set a MapsIndoors Location ID to be used as destination to instantly show directions. |
125
- |`external-IDs`|`etxternalIDs`|`array`|Array of external IDs which filters the map and shows a list of locations. Because of the way browsers work, you can not use External IDs with the `,`, `&`, `#` and `+`, character in them, as they are interpreted by the browser in a particular way. |
125
+ |`external-IDs`|`externalIDs`|`array`|Array of external IDs which filters the map and shows a list of locations. Because of the way browsers work, you can not use External IDs with the `,`, `&`, `#` and `+`, character in them, as they are interpreted by the browser in a particular way. |
126
126
  |`tile-style`|`tileStyle`|`string`|Name of Tile Style to display on the map. |
127
127
  |`start-zoom-level`|`startZoomLevel`|`number`|The initial zoom level of the map. |
128
128
  |`supports-url-parameters`|`supportsUrlParameters`|`bool`|Indicates if the Map Template supports URL parameters. |
@@ -149,9 +149,28 @@ Note that when using the React component, the properties should conform to JSX p
149
149
 
150
150
  The Map Template supports using query parameters for all the properties provided by the MapsIndoorsMap component if the `supportsUrlParameters` property is set to true.
151
151
 
152
+ ### Building the URL
153
+
154
+ Query parameters are added to the end of the Map Template URL:
155
+
156
+ - Put `?` before the **first** parameter.
157
+ - Put `&` between **every following** parameter.
158
+
159
+ How the URL starts depends on whether you load your solution with an App alias or an API key:
160
+
161
+ | You use | Example URL |
162
+ |---|---|
163
+ | App alias in the path (MapsIndoors hosted Map Template) | `https://map.mapsindoors.com/yourAlias?language=zh&venue=yourVenueName` |
164
+ | API key as a query parameter | `https://map.mapsindoors.com/?apiKey=yourApiKey&language=zh&venue=yourVenueName` |
165
+
166
+ **Note!** When you use an App alias in the path, there is no `apiKey=` parameter, so the first parameter you add must start with `?`:
167
+
168
+ - ✅ `https://map.mapsindoors.com/yourAlias?language=zh`
169
+ - ❌ `https://map.mapsindoors.com/yourAlias&language=zh` (the map will not load)
170
+
152
171
  The supported query parameters are the following:
153
172
 
154
- 1. `apiKey` - Used like this `apiKey=yourApiKey`. If no apiKey is provided, the app will default to `mapspeople3d`.
173
+ 1. `apiKey` - Used like this `apiKey=yourApiKey`. Accepts both an API key and an App alias. If no apiKey is provided, the app will default to `mapspeople3d`.
155
174
  2. `venue` - Used like this `venue=yourVenueName` - the Venue property is case sensitive. If no venue is provided, the app will select the first venue from the solution in alphabetical order.
156
175
  3. `locationId` - Used like this `locationId=yourLocationId`
157
176
  4. `primaryColor` - Used like this `primaryColor=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.
@@ -1,4 +1,4 @@
1
- import { R as ji, g as kr, j as A, u as cn, a as ze, m as br, s as Bi, S as Hi, b as Ui, P as K, c as vt, d as qi, i as Vi, e as Xn, f as wr, h as lt, k as Ln, l as $i, p as Wi, n as Xi, o as Yi, v as Ki, q as Gi, r as Qi, t as Ji } from "./reactcomponent-BL2WhGr8.mjs";
1
+ import { R as ji, g as kr, j as A, u as cn, a as ze, m as br, s as Bi, S as Hi, b as Ui, P as K, c as vt, d as qi, i as Vi, e as Xn, f as wr, h as lt, k as Ln, l as $i, p as Wi, n as Xi, o as Yi, v as Ki, q as Gi, r as Qi, t as Ji } from "./reactcomponent-MebtCeq2.mjs";
2
2
  import * as Ve from "react";
3
3
  import { useState as Re, useRef as We, useLayoutEffect as Cr, useMemo as Sr, useEffect as rn, useCallback as _e } from "react";
4
4
  const Zi = (e) => {
@@ -1,4 +1,4 @@
1
- import { x as g, j as R, P as u } from "./reactcomponent-BL2WhGr8.mjs";
1
+ import { x as g, j as R, P as u } from "./reactcomponent-MebtCeq2.mjs";
2
2
  import { useState as _, useEffect as j } from "react";
3
3
  function A(n, e, t, r) {
4
4
  function s(i) {