@inovitas/infra3dapi 1.5.0 → 1.6.0

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
@@ -1,42 +1,59 @@
1
- # Installation
2
-
3
- ### NPM Package
4
-
5
- The API can be installed as a package using npm. To install it from the npm package repository, simply type:
6
-
7
- ```bash
8
- npm install @inovitas/infra3dapi
9
- ```
10
-
11
- ### CDN Download
12
-
13
- Alternatively, you can obtain the API from a CDN. To get the latest version, add the following script to your HTML file:
14
-
15
- ```html
16
- <script src="https://cdn.jsdelivr.net/npm/@inovitas/infra3dapi@latest/infra3dapi.js"></script>
17
- ```
18
-
19
- We recommend using a specific version in your project. To get a specific version, use the following script and adjust the version accordingly:
20
-
21
- ```html
22
- <script src="https://cdn.jsdelivr.net/npm/@inovitas/infra3dapi@1.0.1/infra3dapi.js"></script>
23
- ```
24
-
25
- **Note**: Please do not name the `<div>` in which the viewer is initialized as "infra3d" as this may cause internal conflicts.
26
-
27
- # Core Concept
28
-
29
- To use the API, you can call the init functions in infra3dapi. After loggin in and initializing the view (with [`manager.initView()`](classes/_inovitas_infra3dapi.manager.Manager.html#initView)), you will get a viewer object. This viewer object can then be used to add event-listeners to different events emitted by the viewer (like [`viewer.geoframechanged`](classes/_inovitas_infra3dsdk.Viewer.html#geoframechanged)) or to call some functions (like [`viewer.getRoutes()`](classes/_inovitas_infra3dsdk.Viewer.html#getRoutes) or [`viewer.movePosition()`](classes/_inovitas_infra3dsdk.Viewer.html#movePosition)).
30
-
31
- # Authentication
32
-
33
- 1. Register your OAuth 2.0 application with our sales team to obtain credentials (client_id and client_secret).
34
- 2. Develop a server-side component to securely use these credentials, obtaining an access token from infra3D.
35
- 3. Your server-side component fetches the access token using client credentials, which can then be shared with your client app.
36
- 4. Your client app uses this token to authenticate with infra3D for requested services, refreshing it via the server component when expired. Remember to treat the client_secret like a password, avoiding exposure in client-side environments for enhanced security.
37
-
1
+ # Installation
2
+
3
+ ### NPM Package
4
+
5
+ The API can be installed as a package using npm. To install it from the npm package repository, simply type:
6
+
7
+ ```bash
8
+ npm install @inovitas/infra3dapi
9
+ ```
10
+
11
+ ### CDN Download
12
+
13
+ Alternatively, you can obtain the API from a CDN. To get the latest version, add the following script to your HTML file:
14
+
15
+ ```html
16
+ <script src="https://cdn.jsdelivr.net/npm/@inovitas/infra3dapi@latest/infra3dapi.js"></script>
17
+ ```
18
+
19
+ We recommend using a specific version in your project. To get a specific version, use the following script and adjust the version accordingly:
20
+
21
+ ```html
22
+ <script src="https://cdn.jsdelivr.net/npm/@inovitas/infra3dapi@1.0.1/infra3dapi.js"></script>
23
+ ```
24
+
25
+ **Note**: Please do not name the `<div>` in which the viewer is initialized as "infra3d" as this may cause internal conflicts.
26
+
27
+ # Core Concept
28
+
29
+ To use the API, you can call the init functions in infra3dapi. After loggin in and initializing the view (with [`manager.initView()`](classes/_inovitas_infra3dapi.manager.Manager.html#initView)), you will get a viewer object. This viewer object can then be used to add event-listeners to different events emitted by the viewer (like [`viewer.geoframechanged`](classes/_inovitas_infra3dsdk.Viewer.html#geoframechanged)) or to call some functions (like [`viewer.getRoutes()`](classes/_inovitas_infra3dsdk.Viewer.html#getRoutes) or [`viewer.movePosition()`](classes/_inovitas_infra3dsdk.Viewer.html#movePosition)).
30
+
31
+ # Authentication
32
+
33
+ 1. Register your OAuth 2.0 application with our sales team to obtain credentials (client_id and client_secret).
34
+ 2. Develop a server-side component to securely use these credentials, obtaining an access token from infra3D.
35
+ 3. Your server-side component fetches the access token using client credentials, which can then be shared with your client app.
36
+ 4. Your client app uses this token to authenticate with infra3D for requested services, refreshing it via the server component when expired. Remember to treat the client_secret like a password, avoiding exposure in client-side environments for enhanced security.
37
+
38
38
  # Changelog
39
39
 
40
+ ## 1.6.0 - 2025-10-29
41
+
42
+ ### Bugfixes
43
+
44
+ - When clicking twice on a feature with the info-tool, the feature info disappears
45
+ - When importing Shapefiles, containing an id property, the ID is no longer overwritten with an internal one
46
+
47
+ ### Added
48
+
49
+ - Authenticate interactively. You could now login with the common login mask (using username)
50
+
51
+ ## 1.5.1 - 2025-10-13
52
+
53
+ ### Bugfixes
54
+
55
+ - fix forever loading search when switching from classic to nextgen (IN-3791)
56
+
40
57
  ## 1.5.0 - 2025-09-17
41
58
 
42
59
  ### Added
package/infra3dapi.d.ts CHANGED
@@ -361,15 +361,15 @@ declare class Viewer extends EventEmitter implements IViewer {
361
361
  }
362
362
  ): Promise<GeoJSON>;
363
363
 
364
- getAllCampaigns(bbox?: {
365
- minEasting: number;
366
- maxEasting: number;
367
- minNorthing: number;
368
- maxNorthing: number;
369
- epsg: number;
370
- }): Promise<ICampaign[]>;
364
+ // getAllCampaigns(bbox?: {
365
+ // minEasting: number;
366
+ // maxEasting: number;
367
+ // minNorthing: number;
368
+ // maxNorthing: number;
369
+ // epsg: number;
370
+ // }): Promise<ICampaign[]>;
371
371
 
372
- getCampaign(campagin_uid: string): Promise<ICampaign>;
372
+ // getCampaign(campagin_uid: string): Promise<ICampaign>;
373
373
 
374
374
  attachToMeasurementTool(
375
375
  toolname: "lengthMeasure" | "areaMeasure",
@@ -514,8 +514,40 @@ export declare function init(
514
514
  email?: string;
515
515
  }
516
516
  ): Promise<Manager>;
517
+
517
518
  export declare function destroy(): void;
519
+
518
520
  export declare function getManager(): Manager;
521
+
519
522
  export declare function getGuestAccessToken(): Promise<accessTokenResponseType>;
523
+
524
+ declare type tokenTypeWithProvider = {
525
+ domain: string;
526
+ clientId: string;
527
+ access_token: string;
528
+ expires_in: number;
529
+ id_token?: string;
530
+ refresh_token: string;
531
+ token_type: string;
532
+ };
533
+
534
+ export declare function getAccessTokenFromInteractiveLogin(
535
+ rootId: string,
536
+ tenant?: string
537
+ ): Promise<tokenTypeWithProvider>;
538
+
539
+ declare type refreshTokenType = {
540
+ access_token: string;
541
+ expires_in: number;
542
+ id_token: string;
543
+ token_type: string;
544
+ };
545
+
546
+ export declare function getAccessTokenFromRefresh(
547
+ url: string,
548
+ clientId: string,
549
+ refreshToken: string
550
+ ): Promise<refreshTokenType>;
551
+
520
552
  export declare function refreshToken(token: string): void;
521
553