You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api-reference/editor/editor.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,19 +21,21 @@ const editor = new smplr.Editor({
21
21
picture?:string
22
22
}
23
23
clientToken: string
24
-
containerId: string
24
+
containerId?:string
25
+
container?:HTMLElement
25
26
disableErrorReporting?:boolean
26
27
whiteLabel?:boolean
27
28
}) =>Editor
28
29
```
29
30
30
-
-`spaceId` is the unique identifier of the space in Smplrspace, something like "fbc5617e-5a27-4138-851e-839446121b2e".
31
+
-`spaceId` is the unique identifier of the space in Smplrspace, something like "spc_xxx". Refer to the [page on SIDs](/guides/sid) to learn more.
31
32
-`user` is an object used to identify who is making the changes on the space.
32
33
-`id` is a required unique identifier for the user. It does not represent anything on the Smplrspace side, it should most likely be your own internal `id`. It is used to track who made the changes.
33
34
-`name` is an optional user-readable name for the user. The value is used in the Smplrspace app to indicate who made the changes. If you decide not to indicate the name, the app will indicate that "Someone" made the changes. This is purely an optional to improve your team's user experience of the Smplrspace app.
34
35
-`picture` is an optional URL used as the avatar of the person who made changes in the app. If you decide not to provide a picture, the avatar will not be displayed in the app. This is purely an optional to improve your team's user experience of the Smplrspace app.
35
36
-`clientToken` is an API token that is used to authenticate client-side requests. It is safe to have it exposed in your client code. You can manage your organisation's tokens in the Smplrspace app, by heading to the Developers page from the main menu. [More info](/guides/embedding#client-tokens).
36
37
-`containerId` is the "id" of the html "div" container where smplr.js should render the editor, something like "smplr-container" that can be found in your html. Only ids are supported, not classes.
38
+
-`container` is an alternative to `containerId` that lets you provide the HTML element directly instead of an id.
37
39
-`disableErrorReporting` - _optional_ - can be set to "true" to disable the automated reporting of errors to our 3rd party error tracking tool, [Sentry](https://sentry.io/). We have discovered that Sentry's instrumentation could make it seem as if all network requests originated from smplr.js. Unfortunately, there is nothing simple we can do on our side to avoid that. If this is an issue for you, you can disable Sentry altogether. The tradeoff is that we will not automatically detect errors hapenning in your integration, and you may need to be more proactive to report them for us to roll out fixes.
38
40
-`whiteLabel` - _optional_ - can be set to "true" to remove the "Powered by Smplrspace" attribution from the editor. This is a paid add-on. You can check if it is enabled from the Organization settings page. [Get in touch](mailto:hello@smplrspace.com) to learn more. _Note: there is currently no attribution in the editor, but there might be in the future._
Copy file name to clipboardExpand all lines: docs/api-reference/map/map.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,14 +14,16 @@ To create a Map instance, initialise it as follow.
14
14
15
15
```ts
16
16
const map =newsmplr.Map({
17
-
clientToken: string,
18
-
containerId: string,
19
-
disableErrorReporting?: boolean,
17
+
clientToken: string
18
+
containerId?:string
19
+
container?:HTMLElement
20
+
disableErrorReporting?:boolean
20
21
}) =>Map
21
22
```
22
23
23
24
-`clientToken` is an API token that is used to authenticate client-side requests. It is safe to have it exposed in your client code. You can manage your organisation's tokens in the Smplrspace app, by heading to the Developers page from the main menu. [More info](/guides/embedding#client-tokens).
24
25
-`containerId` is the "id" of the html "div" container where smplr.js should render the viewer, something like "smplr-container" that can be found in your html. Only ids are supported, not classes.
26
+
-`container` is an alternative to `containerId` that lets you provide the HTML element directly instead of an id.
25
27
-`disableErrorReporting` - _optional_ - can be set to "true" to disable the automated reporting of errors to our 3rd party error tracking tool, [Sentry](https://sentry.io/). We have discovered that Sentry's instrumentation could make it seem as if all network requests originated from smplr.js. Unfortunately, there is nothing simple we can do on our side to avoid that. If this is an issue for you, you can disable Sentry altogether. The tradeoff is that we will not automatically detect errors hapenning in your integration, and you may need to be more proactive to report them for us to roll out fixes.
26
28
27
29
## Interactive map viewer session
@@ -44,12 +46,12 @@ map.startViewer({
44
46
}) =>Promise<void>
45
47
```
46
48
47
-
-`spaceIds` - _optional_ - lets you specify the Smplrspace ID of the spaces to render on the map when initializing the viewer. You can also do that dynamically as described on the [Building page](/api-reference/map/buildings).
49
+
-`spaceIds` - _optional_ - lets you specify the Smplrspace ID ("spc_xxx") of the spaces to render on the map when initializing the viewer. You can also do that dynamically as described on the [Building page](/api-reference/map/buildings).
48
50
-`osmBuildings` - _optional_ - lets you choose whether to render or not cities in 3D. City buildings data comes from OpenStreetMap and is automatically rendered in 3D. You can also do that dynamically as described in [3D cities](/api-reference/map/buildings#3d-cities). _Default value: true_.
49
51
-`hash` - _optional_ - lets you choose whether to automatically sync the map location to the hash fragment of the page's URL. This makes it for easy to share links to specific map locations. It relies on Mapbox's corresponding [parameter](https://docs.mapbox.com/mapbox-gl-js/api/map/#map-parameters). _Default value: false_.
50
-
-`fitNewSpacesInScreen` - _optional_ - lets you choose whether to automatically recenter the map to fit all the spaces when the spaces rendered on the map change. You can also center the map using [`fitAllSpacesInScreen`](#fit-all-spaces-in-screen). \_Default value: true.
52
+
-`fitNewSpacesInScreen` - _optional_ - lets you choose whether to automatically recenter the map to fit all the spaces when the spaces rendered on the map change. You can also center the map using [`fitAllSpacesInScreen`](#fit-all-spaces-in-screen). _Default value: true._
51
53
-`loadingMessage` - _optional_ - lets you override the text displayed while the space is loading. This can be change dynamically as well, see [UI controls](#ui-controls). _Default value: "Loading map"_.
52
-
-`forceLoader` - _optional_ - provides programmatic control to whether the loader should be displayed or not. By default we display it while loading the map and initial spaces provided by `spaceIds`, but you can control this if you load your own data as well. This can be change dynamically as well, see [UI controls](#ui-controls). \_Default value: false.
54
+
-`forceLoader` - _optional_ - provides programmatic control to whether the loader should be displayed or not. By default we display it while loading the map and initial spaces provided by `spaceIds`, but you can control this if you load your own data as well. This can be change dynamically as well, see [UI controls](#ui-controls). _Default value: false._
53
55
-`onReady` - _optional_ - is called once the viewer's initial render is done. You may alternatively use the promise returned by startViewer, which resolves when the viewer is ready.
54
56
-`onError` - _optional_ - is called if an error occur while starting the viewer. You may alternatively use the promise returned by startViewer to catch errors.
55
57
-`onSpaceClick` - _optional_ - is called when the user clicks a 3D space, and provide data about which space and which level where clicked.
@@ -78,7 +80,7 @@ You can change automatically "fly" the map to a specific space, by providing the
78
80
map.flyToSpace(spaceId: string) =>void
79
81
```
80
82
81
-
-`spaceId` - unique identifier of the space in Smplrspace, something like "fbc5617e-5a27-4138-851e-839446121b2e".
83
+
-`spaceId` - unique identifier of the space in Smplrspace, something like "spc_xxx".
Copy file name to clipboardExpand all lines: docs/api-reference/queryclient/furniture.md
+16-12Lines changed: 16 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,10 @@ sidebar_position: 6
4
4
5
5
# Furniture
6
6
7
+
:::info
8
+
"Furniture" is gradually being renamed to "Equipment". You'll read equipment is the app and furniture here, until the change is complete. They are one and the same concept.
9
+
:::
10
+
7
11
## Furniture interface
8
12
9
13
Multiple queries in this page return objects of the type `Furniture` described below:
@@ -47,21 +51,21 @@ interface Furniture {
47
51
To list all furniture from a space, you can call the following query.
-`spaceId` - unique identifier of the space in Smplrspace, something like "fbc5617e-5a27-4138-851e-839446121b2e".
113
+
-`spaceId` - unique identifier of the space in Smplrspace, something like "spc_xxx".
110
114
-`polygon` - the definition of the area used as a mask to extract furniture. It has the same schema as the coordinates from the [polygon data layers](/api-reference/space/data-layers#polygon-layer). It is assumed here that all coordinates have the same `levelIndex` value.
111
115
-`Furniture` - this main interface is described [here](#furniture-interface).
-`spaceId` - unique identifier of the space in Smplrspace, something like "fbc5617e-5a27-4138-851e-839446121b2e".
177
-
-`furnitureId` - unique identifier of the furniture in the space, has a similar format to `spaceId`.
180
+
-`spaceId` - unique identifier of the space in Smplrspace, something like "spc_xxx".
181
+
-`furnitureId` - unique identifier of the furniture in the space, something like "fbc5617e-5a27-4138-851e-839446121b2e".
178
182
-`closed` - _optional_ - indicates whether the returned array should be "closed", i.e. the last element repeats the first element. _Default value: false._
179
183
180
184
Returns `null` if the furniture is not found in the space.
-`spaceId` - unique identifier of the space in Smplrspace, something like "fbc5617e-5a27-4138-851e-839446121b2e".
217
-
-`furnitureId` - unique identifier of the furniture in the space, has a similar format to `spaceId`.
220
+
-`spaceId` - unique identifier of the space in Smplrspace, something like "spc_xxx".
221
+
-`furnitureId` - unique identifier of the furniture in the space, something like "fbc5617e-5a27-4138-851e-839446121b2e".
218
222
-`polygon` - the definition of the area used as a mask to extract furniture. It has the same schema as the coordinates from the [polygon data layers](/api-reference/space/data-layers#polygon-layer). It is assumed here that all coordinates have the same `levelIndex` value.
219
223
220
224
Returns `null` if the furniture is not found in the space, `false` if it is found but not in the polygon, `true` if it is found in the polygon.
-`point` - the point coordinates in 2D, with the same schema as `polygon` below.
158
-
-`polygon` - the definition of the area used as a mask to extract furniture. It has the same schema as the coordinates from the [polygon data layers](/api-reference/space/data-layers#polygon-layer). It is assumed here that all coordinates have the same `levelIndex` value.
158
+
-`polygon` - the polygon in which the point should be located or not. It has the same schema as the coordinates from the [polygon data layers](/api-reference/space/data-layers#polygon-layer). It is assumed here that all coordinates have the same `levelIndex` value.
159
159
160
160
A similar query is available for furniture pieces, see [isFurnitureInPolygon](/api-reference/queryclient/furniture#isfurnitureinpolygon).
-`spaceId` - unique identifier of the space in Smplrspace, something like "fbc5617e-5a27-4138-851e-839446121b2e".
23
+
-`spaceId` - unique identifier of the space in Smplrspace, something like "spc_xxx".
24
24
-`levelIndex` - zero-based index of the level. Refer to the [Furniture interface](/api-reference/queryclient/furniture#furniture-interface) to learn more.
25
25
-`padding` - _optional_ - minimum space between the floor plate's grounds/walls and the bounding box in meters. _Default value: 0_
-`spaceId` - unique identifier of the space in Smplrspace, something like "fbc5617e-5a27-4138-851e-839446121b2e".
60
+
-`spaceId` - unique identifier of the space in Smplrspace, something like "spc_xxx".
61
61
-`levelIndex` - zero-based index of the level. Refer to the [Furniture interface](/api-reference/queryclient/furniture#furniture-interface) to learn more.
62
62
63
63
## getLevelAutomaticGroundFromCache
@@ -105,7 +105,7 @@ smplrClient.getRoomsOnLevel({
105
105
}[] |null>
106
106
```
107
107
108
-
-`spaceId` - unique identifier of the space in Smplrspace, something like "fbc5617e-5a27-4138-851e-839446121b2e".
108
+
-`spaceId` - unique identifier of the space in Smplrspace, something like "spc_xxx".
109
109
-`levelIndex` - zero-based index of the level. Refer to the [Furniture interface](/api-reference/queryclient/furniture#furniture-interface) to learn more.
110
110
-`useCache` - _optional_ - set this to control whether the request should use the client's local cache of computed automatic rooms. You can call this query with `useCache` set to `false` to refresh the cache for all automatic rooms related queries. _Default value: true_
111
111
@@ -157,7 +157,7 @@ smplrClient.getRoomAtPoint({
157
157
}[] |null>
158
158
```
159
159
160
-
-`spaceId` - unique identifier of the space in Smplrspace, something like "fbc5617e-5a27-4138-851e-839446121b2e".
160
+
-`spaceId` - unique identifier of the space in Smplrspace, something like "spc_xxx".
161
161
-`point` - the point coordinates in 2D, with the same schema as `polygon` below.
0 commit comments