@inovitas/infra3dapi 1.3.0 → 1.4.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.
Binary file
Binary file
Binary file
Binary file
Binary file
package/README.md CHANGED
@@ -37,6 +37,25 @@ To use the API, you can call the init functions in infra3dapi. After loggin in a
37
37
 
38
38
  # Changelog
39
39
 
40
+ ## 1.4.0 - 07.08.2025
41
+
42
+ ### Changes
43
+
44
+ - Improve What's New Announcements
45
+
46
+ ### Added
47
+
48
+ - Linear Reference tools: Axisscalebar, Axis Panel, Linear Reference Measurement
49
+ - Survey Wheel Measure
50
+ - PDF Export Tool
51
+
52
+ ## 1.3.1 - 25.07.2025
53
+
54
+ ### Bugfixes
55
+
56
+ - Fix types-file
57
+ - Bundle images inside the js-file
58
+
40
59
  ## 1.3.0 - 02.07.2025
41
60
 
42
61
  ### Added
Binary file
Binary file
Binary file
package/infra3dapi.d.ts CHANGED
@@ -1,14 +1,3 @@
1
- ILatLonFov,
2
- IPanZoom,
3
- } from "@inovitas/infra3dsdk/dist/types/mm/geoframe/interfaces/IPointTo";
4
-
5
- GeometryOverlay,
6
- IGeometryOverlayOptions,
7
- } from "../src/ui-base/common/services/GeometryOverlay";
8
- GeoJSON,
9
- Geometry,
10
- } from "../src/ui-base/common/services/viewer/externals/geojson";
11
-
12
1
  declare module "@inovitas/infra3dapi";
13
2
 
14
3
  declare type Fn = (arg: any) => void;
@@ -83,6 +72,246 @@ interface ICampaign {
83
72
  end_timestamp: number;
84
73
  }
85
74
 
75
+ interface IBaseFeatureStyle {
76
+ stylename: string;
77
+ rules: IBaseFeatureStyleRule[];
78
+ }
79
+ interface IBaseFeatureStyleRule {
80
+ name?: string;
81
+ filter?: string;
82
+ symbolizer: "point" | "line" | "polygon";
83
+ params: IBaseFeatureStyleParams;
84
+ }
85
+ interface IBaseFeatureStyleParams {
86
+ stroke?: number[];
87
+ }
88
+ interface IPointFeatureStyle extends IBaseFeatureStyle {
89
+ rules: IPointFeatureStyleRule[];
90
+ }
91
+ interface IPointFeatureStyleRule extends IBaseFeatureStyleRule {
92
+ symbolizer: "point";
93
+ params:
94
+ | INamedFontMarkerFeatureStyleParams
95
+ | ICustomFontMarkerFeatureStyleParams
96
+ | IBillboardFeatureStyleParams
97
+ | IPointFeatureStyleParams;
98
+ }
99
+ interface IPointFeatureStyleParams extends IBaseFeatureStyleParams {
100
+ size?: number;
101
+ "vertex-colors"?: boolean;
102
+ }
103
+ interface INamedFontMarkerFeatureStyleParams extends IPointFeatureStyleParams {
104
+ "font-marker": {
105
+ name:
106
+ | "square-o"
107
+ | "square"
108
+ | "location-arrow"
109
+ | "star-o"
110
+ | "star"
111
+ | "map-pin"
112
+ | "map-marker"
113
+ | "crosshairs"
114
+ | "circle-o"
115
+ | "circle"
116
+ | "cross";
117
+ rotation?: number;
118
+ fontsize?: number;
119
+ anchor?: [string, string];
120
+ };
121
+ }
122
+ interface ICustomFontMarkerFeatureStyleParams extends IPointFeatureStyleParams {
123
+ "font-marker": {
124
+ fontface: string;
125
+ content: string;
126
+ rotation?: number;
127
+ fontsize?: number;
128
+ anchor?: [string, string];
129
+ };
130
+ }
131
+ interface IBillboardFeatureStyleParams extends IPointFeatureStyleParams {
132
+ billboard: string;
133
+ }
134
+ interface ILineFeatureStyle extends IBaseFeatureStyle {
135
+ rules: (ILineFeatureStyleRule | IPointFeatureStyleRule)[];
136
+ }
137
+ interface ILineFeatureStyleRule extends IBaseFeatureStyleRule {
138
+ symbolizer: "line";
139
+ params: ILineFeatureStyleParams;
140
+ }
141
+ interface ILineFeatureStyleParams extends IBaseFeatureStyleParams {
142
+ "stroke-width": number;
143
+ "stroke-dash-width"?: number;
144
+ "stroke-gap-width"?: number;
145
+ }
146
+ interface IPolygonFeatureStyle extends IBaseFeatureStyle {
147
+ rules: (
148
+ | IPolygonFeatureStyleRule
149
+ | ILineFeatureStyleRule
150
+ | IPointFeatureStyleRule
151
+ )[];
152
+ }
153
+ interface IPolygonFeatureStyleRule extends IBaseFeatureStyleRule {
154
+ symbolizer: "polygon";
155
+ params: IPolygonFeatureStyleParams;
156
+ }
157
+ interface IPolygonFeatureStyleParams extends IBaseFeatureStyleParams {
158
+ fill: number[];
159
+ "stroke-width"?: number;
160
+ "stroke-dash-width"?: number;
161
+ "stroke-gap-width"?: number;
162
+ }
163
+ declare type IFeatureStyle =
164
+ | IPolygonFeatureStyle
165
+ | ILineFeatureStyle
166
+ | IPointFeatureStyle;
167
+ declare type IFeatureStyleRule =
168
+ | IPointFeatureStyleRule
169
+ | ILineFeatureStyleRule
170
+ | IPolygonFeatureStyleRule;
171
+ declare type IFeatureStyleParams =
172
+ | IPointFeatureStyleParams
173
+ | INamedFontMarkerFeatureStyleParams
174
+ | ICustomFontMarkerFeatureStyleParams
175
+ | IBillboardFeatureStyleParams
176
+ | ILineFeatureStyleParams
177
+ | IPolygonFeatureStyleParams;
178
+
179
+ interface IGeometryOverlayOptions {
180
+ style?: IFeatureStyle;
181
+
182
+ highlightstyle?: IFeatureStyle;
183
+
184
+ snappable?: boolean;
185
+
186
+ visible?: boolean;
187
+ }
188
+
189
+ declare class GeometryOverlay {
190
+ constructor(viewer: Viewer, options?: IGeometryOverlayOptions);
191
+
192
+ setStyle(style: IFeatureStyle): void;
193
+
194
+ setHighlightStyle(highlightstyle: IFeatureStyle): void;
195
+
196
+ getSnappable(): boolean;
197
+
198
+ setSnappable(snappable: boolean): void;
199
+
200
+ getVisible(): boolean;
201
+
202
+ setVisible(visible: boolean): void;
203
+
204
+ addGeometry(geometry: Geometry, selected?: boolean): void;
205
+
206
+ removeGeometry(geometry: Geometry): void;
207
+
208
+ clear(): void;
209
+
210
+ selectGeometry(geometry: Geometry): void;
211
+
212
+ unselectGeometry(geometry: Geometry): void;
213
+ }
214
+
215
+ interface IPointTo {
216
+ type: "pano" | "panzoom" | "coordinate";
217
+ }
218
+ interface ILatLonFov extends IPointTo {
219
+ type: "pano";
220
+ lat: number;
221
+ lon: number;
222
+ fov: number;
223
+ }
224
+ interface IPanZoom extends IPointTo {
225
+ type: "panzoom";
226
+ panX?: number;
227
+ panY?: number;
228
+ zoom?: number;
229
+ }
230
+
231
+ type GeoJsonGeometryTypes = Geometry["type"];
232
+
233
+ type GeoJsonTypes = GeoJSON["type"];
234
+
235
+ type BBox =
236
+ | [number, number, number, number]
237
+ | [number, number, number, number, number, number];
238
+
239
+ type Position = number[]; // [number, number] | [number, number, number];
240
+
241
+ interface GeoJsonObject {
242
+ // Don't include foreign members directly into this type def.
243
+ // in order to preserve type safety.
244
+ // [key: string]: any;
245
+ type: GeoJsonTypes;
246
+ bbox?: BBox | undefined;
247
+ }
248
+
249
+ type GeoJSON = Geometry | Feature | FeatureCollection;
250
+
251
+ type Geometry =
252
+ | Point
253
+ | MultiPoint
254
+ | LineString
255
+ | MultiLineString
256
+ | Polygon
257
+ | MultiPolygon
258
+ | GeometryCollection;
259
+ type GeometryObject = Geometry;
260
+
261
+ interface Point extends GeoJsonObject {
262
+ type: "Point";
263
+ coordinates: Position;
264
+ }
265
+
266
+ interface MultiPoint extends GeoJsonObject {
267
+ type: "MultiPoint";
268
+ coordinates: Position[];
269
+ }
270
+
271
+ interface LineString extends GeoJsonObject {
272
+ type: "LineString";
273
+ coordinates: Position[];
274
+ }
275
+
276
+ interface MultiLineString extends GeoJsonObject {
277
+ type: "MultiLineString";
278
+ coordinates: Position[][];
279
+ }
280
+
281
+ interface Polygon extends GeoJsonObject {
282
+ type: "Polygon";
283
+ coordinates: Position[][];
284
+ }
285
+
286
+ interface MultiPolygon extends GeoJsonObject {
287
+ type: "MultiPolygon";
288
+ coordinates: Position[][][];
289
+ }
290
+
291
+ interface GeometryCollection<G extends Geometry = Geometry>
292
+ extends GeoJsonObject {
293
+ type: "GeometryCollection";
294
+ geometries: G[];
295
+ }
296
+
297
+ type GeoJsonProperties = { [name: string]: any } | null;
298
+
299
+ interface Feature<G extends Geometry | null = Geometry, P = GeoJsonProperties>
300
+ extends GeoJsonObject {
301
+ type: "Feature";
302
+ geometry: G;
303
+ id?: string | number | undefined;
304
+ properties: P;
305
+ }
306
+
307
+ interface FeatureCollection<
308
+ G extends Geometry | null = Geometry,
309
+ P = GeoJsonProperties,
310
+ > extends GeoJsonObject {
311
+ type: "FeatureCollection";
312
+ features: Array<Feature<G, P>>;
313
+ }
314
+
86
315
  declare class InternalViewer {}
87
316
  declare class ApmBase {}
88
317
 
@@ -132,15 +361,15 @@ declare class Viewer extends EventEmitter implements IViewer {
132
361
  }
133
362
  ): Promise<GeoJSON>;
134
363
 
135
- // getAllCampaigns(bbox?: {
136
- // minEasting: number;
137
- // maxEasting: number;
138
- // minNorthing: number;
139
- // maxNorthing: number;
140
- // epsg: number;
141
- // }): Promise<ICampaign[]>;
364
+ getAllCampaigns(bbox?: {
365
+ minEasting: number;
366
+ maxEasting: number;
367
+ minNorthing: number;
368
+ maxNorthing: number;
369
+ epsg: number;
370
+ }): Promise<ICampaign[]>;
142
371
 
143
- // getCampaign(campagin_uid: string): Promise<ICampaign>;
372
+ getCampaign(campagin_uid: string): Promise<ICampaign>;
144
373
 
145
374
  attachToMeasurementTool(
146
375
  toolname: "lengthMeasure" | "areaMeasure",