@mappedin/mappedin-js 5.6.1 → 5.7.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/lib/esm/get-venue/index.d.ts +3 -3
- package/lib/esm/get-venue/index.js +1 -1
- package/lib/esm/navigator/index.js +1 -1
- package/lib/esm/renderer/{browser-YHGVYIGM.js → browser-5CIN6W7C.js} +1 -1
- package/lib/esm/renderer/chunk-77EWGHBK.js +1 -0
- package/lib/esm/renderer/index.d.ts +112 -30
- package/lib/esm/renderer/index.js +1 -1
- package/lib/mappedin.js +1 -1
- package/lib/node/index.js +1 -1
- package/package.json +2 -2
- package/lib/esm/renderer/chunk-QYXOIF6C.js +0 -1
|
@@ -12,7 +12,7 @@ declare module '@mappedin/mappedin-js' {
|
|
|
12
12
|
import type { TMapViewOptions, TJourneyOptions } from '@mappedin/mappedin-js/renderer/MapView.types';
|
|
13
13
|
import { labelThemes } from '@mappedin/mappedin-js/renderer/MapView.types';
|
|
14
14
|
import { MARKER_ANCHOR } from '@mappedin/mappedin-js/renderer/internal/Mappedin.Marker';
|
|
15
|
-
export type { Marker } from '@mappedin/mappedin-js/renderer/
|
|
15
|
+
export type { Marker } from '@mappedin/mappedin-js/renderer/internal/Mappedin.Markers';
|
|
16
16
|
export { BEARING_TYPE, ACTION_TYPE } from '@mappedin/mappedin-js/navigator';
|
|
17
17
|
export type { IDirectionsResult, E_MESSAGES as E_GET_DIRECTIONS_MESSAGES } from '@mappedin/mappedin-js/navigator';
|
|
18
18
|
export type { IFlatLabels, FlatLabels } from '@mappedin/mappedin-js/renderer/MapView.FlatLabels';
|
|
@@ -102,13 +102,14 @@ declare module '@mappedin/mappedin-js/renderer/MapView' {
|
|
|
102
102
|
import { E_SDK_EVENT, STATE } from '@mappedin/mappedin-js/renderer/MapView.enums';
|
|
103
103
|
import SmartTooltip from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartTooltip';
|
|
104
104
|
import Camera from '@mappedin/mappedin-js/renderer/Camera';
|
|
105
|
-
import { Marker } from '@mappedin/mappedin-js/renderer/
|
|
105
|
+
import { Marker } from '@mappedin/mappedin-js/renderer/internal/Mappedin.Markers';
|
|
106
106
|
import { PubSub } from '@mappedin/mappedin-js/renderer/internal/pub-sub.typed';
|
|
107
107
|
import BlueDotLayer from '@mappedin/mappedin-js/renderer/layers/BlueDot';
|
|
108
108
|
import JourneyLayer from '@mappedin/mappedin-js/renderer/layers/Journey';
|
|
109
109
|
import { TGetPolygonsAtCoordinateOptions } from '@mappedin/mappedin-js/renderer';
|
|
110
110
|
import { IFlatLabels } from '@mappedin/mappedin-js/renderer/MapView.FlatLabels';
|
|
111
111
|
import { IFloatingLabels } from '@mappedin/mappedin-js/renderer/MapView.FloatingLabels';
|
|
112
|
+
import { MarkersLayer } from '@mappedin/mappedin-js/renderer/layers/Markers';
|
|
112
113
|
export enum INTERNAL_EVENT {
|
|
113
114
|
ON_FIRST_MAP_LOADED = 0,
|
|
114
115
|
TEXTURE_LOADED = 1,
|
|
@@ -180,6 +181,7 @@ declare module '@mappedin/mappedin-js/renderer/MapView' {
|
|
|
180
181
|
Camera: Camera;
|
|
181
182
|
FlatLabels: IFlatLabels<void>;
|
|
182
183
|
FloatingLabels: IFloatingLabels<void>;
|
|
184
|
+
Markers: MarkersLayer;
|
|
183
185
|
options: TMapViewOptions;
|
|
184
186
|
constructor(container: HTMLElement, venue: Mappedin, options?: TMapViewOptions & {
|
|
185
187
|
onFirstMapLoaded: () => void;
|
|
@@ -280,16 +282,18 @@ declare module '@mappedin/mappedin-js/renderer/MapView' {
|
|
|
280
282
|
*/
|
|
281
283
|
removeInteractivePolygon(polygonOrPolygonId: MappedinPolygon | string): void;
|
|
282
284
|
/**
|
|
283
|
-
* Attach any HTML to a {@link MappedinNode}, and have the marker interact and collide with smart labels and tooltips
|
|
285
|
+
* Attach any HTML to a {@link MappedinNode} or {@link MappedinCoordinate}, and have the marker interact and collide with smart labels and tooltips
|
|
286
|
+
* @deprecated use `mapView.Markers.add` instead.
|
|
284
287
|
*/
|
|
285
288
|
createMarker(nodeOrCoordinate: MappedinNode | MappedinCoordinate, contentHtml: string, options?: TCreateMarkerOptions): Marker;
|
|
286
289
|
/**
|
|
287
290
|
* Remove Marker
|
|
291
|
+
* @deprecated use `mapView.Markers.remove` instead.
|
|
288
292
|
*/
|
|
289
293
|
removeMarker(markerOrMarkerId: Marker | Marker['id']): void;
|
|
290
294
|
/**
|
|
291
295
|
* Removes all Markers (from all Maps, not just the current one).
|
|
292
|
-
*
|
|
296
|
+
* @deprecated use `mapView.Markers.removeAll` instead.
|
|
293
297
|
*/
|
|
294
298
|
removeAllMarkers(): void;
|
|
295
299
|
/**
|
|
@@ -347,9 +351,9 @@ declare module '@mappedin/mappedin-js/renderer/MapView' {
|
|
|
347
351
|
*/
|
|
348
352
|
nodeOrCoordinate: MappedinNode | MappedinCoordinate, contentHtml: string, selector: string, options?: TCreateTooltipCommonOptions): SmartTooltip;
|
|
349
353
|
/**
|
|
350
|
-
* Removes a
|
|
354
|
+
* Removes a Tooltip you have added previously.
|
|
351
355
|
*
|
|
352
|
-
* @param tooltipOrTooltipId A Tooltip that has previously been returned from {@link MapView.createTooltip}.
|
|
356
|
+
* @param tooltipOrTooltipId A Tooltip or Tooltip id that has previously been returned from {@link MapView.createTooltip}.
|
|
353
357
|
*/
|
|
354
358
|
removeTooltip(tooltipOrTooltipId: SmartTooltip | SmartTooltip['id']): void;
|
|
355
359
|
/**
|
|
@@ -779,7 +783,7 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
|
|
|
779
783
|
import { TBlueDotPositionUpdate, TBlueDotStateChange } from '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
|
|
780
784
|
import { TOOLTIP_ANCHOR } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartTooltip';
|
|
781
785
|
import type { Euler, Object3D, Vector3 } from 'three';
|
|
782
|
-
import { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT, MAP_RENDER_MODE } from '@mappedin/mappedin-js/renderer/MapView.enums';
|
|
786
|
+
import { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT, MAP_RENDER_MODE, CAMERA_EASING_MODE } from '@mappedin/mappedin-js/renderer/MapView.enums';
|
|
783
787
|
export type { TEnableBlueDotOptions, TFloatingLabelAppearance };
|
|
784
788
|
/**
|
|
785
789
|
An extension of the GeolocationPosition type.
|
|
@@ -969,6 +973,16 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
|
|
|
969
973
|
rank?: COLLISION_RANKING_TIERS | number;
|
|
970
974
|
anchor?: MARKER_ANCHOR;
|
|
971
975
|
};
|
|
976
|
+
export type TAnimationOptions = {
|
|
977
|
+
/**
|
|
978
|
+
* Animation duration in milliseconds
|
|
979
|
+
*/
|
|
980
|
+
duration?: number;
|
|
981
|
+
/**
|
|
982
|
+
* Mode for easing in and out of the animation.
|
|
983
|
+
*/
|
|
984
|
+
easing?: CAMERA_EASING_MODE;
|
|
985
|
+
};
|
|
972
986
|
export type TCreateTooltipInternalOptions = {
|
|
973
987
|
nodeOrCoordinate: MappedinNode | MappedinCoordinate;
|
|
974
988
|
html?: string;
|
|
@@ -1225,7 +1239,7 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
|
|
|
1225
1239
|
text: string;
|
|
1226
1240
|
scale?: number;
|
|
1227
1241
|
/**
|
|
1228
|
-
* Ranking tier to determine how likely a {@link
|
|
1242
|
+
* Ranking tier to determine how likely a {@link FloatingLabels | Floating Label} will appear
|
|
1229
1243
|
*/
|
|
1230
1244
|
rank?: COLLISION_RANKING_TIERS | number;
|
|
1231
1245
|
/**
|
|
@@ -1256,7 +1270,7 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
|
|
|
1256
1270
|
*/
|
|
1257
1271
|
locations?: MappedinLocation[];
|
|
1258
1272
|
/**
|
|
1259
|
-
* Custom
|
|
1273
|
+
* Custom translation map for location states
|
|
1260
1274
|
*/
|
|
1261
1275
|
translationMap?: {
|
|
1262
1276
|
[key in string]: string;
|
|
@@ -1445,9 +1459,9 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.Marker' {
|
|
|
1445
1459
|
export default InternalMarker;
|
|
1446
1460
|
}
|
|
1447
1461
|
|
|
1448
|
-
declare module '@mappedin/mappedin-js/renderer/
|
|
1462
|
+
declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.Markers' {
|
|
1449
1463
|
import { MappedinCoordinate, MappedinNode } from '@mappedin/mappedin-js/get-venue';
|
|
1450
|
-
import { TCreateMarkerOptions } from '@mappedin/mappedin-js/renderer';
|
|
1464
|
+
import { TCreateMarkerOptions, TAnimationOptions } from '@mappedin/mappedin-js/renderer';
|
|
1451
1465
|
import InternalMarker from '@mappedin/mappedin-js/renderer/internal/Mappedin.Marker';
|
|
1452
1466
|
import { ICore } from '@mappedin/mappedin-js/renderer/Core.interface';
|
|
1453
1467
|
/**
|
|
@@ -1469,14 +1483,42 @@ declare module '@mappedin/mappedin-js/renderer/layers/Markers' {
|
|
|
1469
1483
|
*/
|
|
1470
1484
|
get contentEl(): any;
|
|
1471
1485
|
}
|
|
1472
|
-
class
|
|
1486
|
+
class MarkersController {
|
|
1473
1487
|
#private;
|
|
1474
1488
|
constructor(core: ICore);
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1489
|
+
/**
|
|
1490
|
+
* Create a new Marker, containing some HTML, at the specified position
|
|
1491
|
+
* @param nodeOrCoordinate the position for the Marker
|
|
1492
|
+
* @param contentHtml the content to show in the Marker
|
|
1493
|
+
* @param options options for the display of the Marker
|
|
1494
|
+
* @returns the Marker object that was created.
|
|
1495
|
+
*/
|
|
1496
|
+
add(nodeOrCoordinate: MappedinNode | MappedinCoordinate, contentHtml: string, options?: TCreateMarkerOptions): Marker;
|
|
1497
|
+
updateMap(internalMarker: InternalMarker, from: string, to: string): void;
|
|
1498
|
+
/**
|
|
1499
|
+
* Moves a Marker to a new position instantaneously.
|
|
1500
|
+
* @param markerOrMarkerId the Marker to move
|
|
1501
|
+
* @param target the new position for this Marker
|
|
1502
|
+
*/
|
|
1503
|
+
setPosition(markerOrMarkerId: Marker | Marker['id'], target: MappedinNode | MappedinCoordinate): void;
|
|
1504
|
+
/**
|
|
1505
|
+
* Moves a Marker to a new position over time.
|
|
1506
|
+
* @param markerOrMarkerId the Marker to move
|
|
1507
|
+
* @param target the new position for this Marker
|
|
1508
|
+
* @param options the options for how this movement should be animated
|
|
1509
|
+
*/
|
|
1510
|
+
animate(markerOrMarkerId: Marker | Marker['id'], target: MappedinCoordinate | MappedinNode, options?: TAnimationOptions): Promise<void>;
|
|
1511
|
+
/**
|
|
1512
|
+
* Removes a Marker.
|
|
1513
|
+
* @param markerOrMarkerId the Marker to be removed
|
|
1514
|
+
*/
|
|
1515
|
+
remove(markerOrMarkerId: Marker | Marker['id']): void;
|
|
1516
|
+
/**
|
|
1517
|
+
* Remove all Markers from all maps.
|
|
1518
|
+
*/
|
|
1519
|
+
removeAll(): void;
|
|
1478
1520
|
}
|
|
1479
|
-
export default
|
|
1521
|
+
export default MarkersController;
|
|
1480
1522
|
}
|
|
1481
1523
|
|
|
1482
1524
|
declare module '@mappedin/mappedin-js/navigator' {
|
|
@@ -1516,7 +1558,10 @@ declare module '@mappedin/mappedin-js/renderer/MapView.FlatLabels' {
|
|
|
1516
1558
|
*/
|
|
1517
1559
|
setAppearance(polygon: MappedinPolygon, appearance: TFlatLabelAppearance): T;
|
|
1518
1560
|
/**
|
|
1519
|
-
* Sets the color for
|
|
1561
|
+
* Sets the hover text color for all Flat Labels.
|
|
1562
|
+
* Expects color in hexadecimal string e.g. `#2e2e2e`
|
|
1563
|
+
*
|
|
1564
|
+
* To set hover color for all polygons, see {@link MapView.setHoverColor}.
|
|
1520
1565
|
*/
|
|
1521
1566
|
setHoverColorForAll(color: string): T;
|
|
1522
1567
|
}
|
|
@@ -1905,8 +1950,8 @@ declare module '@mappedin/mappedin-js/renderer/Camera' {
|
|
|
1905
1950
|
import { ICore } from '@mappedin/mappedin-js/renderer/Core.interface';
|
|
1906
1951
|
import { MappedinNode, MappedinPolygon, MappedinCoordinate } from '@mappedin/mappedin-js/get-venue';
|
|
1907
1952
|
import { PubSub } from '@mappedin/mappedin-js/renderer/internal/pub-sub.typed';
|
|
1908
|
-
import { CAMERA_EVENT_PAYLOAD } from '@mappedin/mappedin-js/renderer/MapView.types';
|
|
1909
|
-
import { E_CAMERA_EVENT, E_CAMERA_DIRECTION,
|
|
1953
|
+
import { CAMERA_EVENT_PAYLOAD, TAnimationOptions } from '@mappedin/mappedin-js/renderer/MapView.types';
|
|
1954
|
+
import { E_CAMERA_EVENT, E_CAMERA_DIRECTION, SAFE_AREA_INSET_TYPE } from '@mappedin/mappedin-js/renderer/MapView.enums';
|
|
1910
1955
|
export type TSafeAreaInsets = {
|
|
1911
1956
|
top: number;
|
|
1912
1957
|
left: number;
|
|
@@ -1941,13 +1986,7 @@ declare module '@mappedin/mappedin-js/renderer/Camera' {
|
|
|
1941
1986
|
rotation?: number;
|
|
1942
1987
|
position?: MappedinCoordinate | MappedinNode;
|
|
1943
1988
|
};
|
|
1944
|
-
export type TCameraAnimationOptions =
|
|
1945
|
-
/**
|
|
1946
|
-
* Animation duration in milliseconds
|
|
1947
|
-
*/
|
|
1948
|
-
duration?: number;
|
|
1949
|
-
easing?: CAMERA_EASING_MODE;
|
|
1950
|
-
};
|
|
1989
|
+
export type TCameraAnimationOptions = TAnimationOptions;
|
|
1951
1990
|
/**
|
|
1952
1991
|
* The Camera object specifies a view of the map and allows manipulation of that view.
|
|
1953
1992
|
*/
|
|
@@ -2250,7 +2289,7 @@ declare module '@mappedin/mappedin-js/renderer' {
|
|
|
2250
2289
|
import type { TMapViewOptions, TJourneyOptions } from '@mappedin/mappedin-js/renderer/MapView.types';
|
|
2251
2290
|
import { labelThemes } from '@mappedin/mappedin-js/renderer/MapView.types';
|
|
2252
2291
|
import { MARKER_ANCHOR } from '@mappedin/mappedin-js/renderer/internal/Mappedin.Marker';
|
|
2253
|
-
export type { Marker } from '@mappedin/mappedin-js/renderer/
|
|
2292
|
+
export type { Marker } from '@mappedin/mappedin-js/renderer/internal/Mappedin.Markers';
|
|
2254
2293
|
export { BEARING_TYPE, ACTION_TYPE } from '@mappedin/mappedin-js/navigator';
|
|
2255
2294
|
export type { IDirectionsResult, E_MESSAGES as E_GET_DIRECTIONS_MESSAGES } from '@mappedin/mappedin-js/navigator';
|
|
2256
2295
|
export type { IFlatLabels, FlatLabels } from '@mappedin/mappedin-js/renderer/MapView.FlatLabels';
|
|
@@ -2332,6 +2371,47 @@ declare module '@mappedin/mappedin-js/renderer' {
|
|
|
2332
2371
|
IOutdoorContextProvider } from './layers/Outdoor-Context/Outdoor-Context.provider';
|
|
2333
2372
|
}
|
|
2334
2373
|
|
|
2374
|
+
declare module '@mappedin/mappedin-js/renderer/layers/Markers' {
|
|
2375
|
+
import { TAnimationOptions } from '@mappedin/mappedin-js/renderer';
|
|
2376
|
+
import { MappedinCoordinate, MappedinNode } from '@mappedin/mappedin-js/get-venue';
|
|
2377
|
+
import { TCreateMarkerOptions } from '@mappedin/mappedin-js/renderer/index.rn';
|
|
2378
|
+
import MarkersController, { Marker } from '@mappedin/mappedin-js/renderer/internal/Mappedin.Markers';
|
|
2379
|
+
export class MarkersLayer {
|
|
2380
|
+
#private;
|
|
2381
|
+
constructor(markersController: MarkersController);
|
|
2382
|
+
/**
|
|
2383
|
+
* Create a new Marker, containing some HTML, at the specified position
|
|
2384
|
+
* @param nodeOrCoordinate the position for the Marker
|
|
2385
|
+
* @param contentHtml the content to show in the Marker
|
|
2386
|
+
* @param options options for the display of the Marker
|
|
2387
|
+
* @returns the Marker object that was created.
|
|
2388
|
+
*/
|
|
2389
|
+
add(nodeOrCoordinate: MappedinNode | MappedinCoordinate, contentHtml: string, options?: TCreateMarkerOptions): Marker;
|
|
2390
|
+
/**
|
|
2391
|
+
* Moves a Marker to a new position instantaneously.
|
|
2392
|
+
* @param markerOrMarkerId the Marker to move
|
|
2393
|
+
* @param target the new position for this Marker
|
|
2394
|
+
*/
|
|
2395
|
+
setPosition(markerOrMarkerId: Marker | Marker['id'], target: MappedinNode | MappedinCoordinate): void;
|
|
2396
|
+
/**
|
|
2397
|
+
* Moves a Marker to a new position over time.
|
|
2398
|
+
* @param markerOrMarkerId the Marker to move
|
|
2399
|
+
* @param target the new position for this Marker
|
|
2400
|
+
* @param options the options for how this movement should be animated
|
|
2401
|
+
*/
|
|
2402
|
+
animate(markerOrMarkerId: Marker | Marker['id'], target: MappedinCoordinate | MappedinNode, options?: TAnimationOptions): Promise<void>;
|
|
2403
|
+
/**
|
|
2404
|
+
* Removes a Marker.
|
|
2405
|
+
* @param markerOrMarkerId the Marker to be removed
|
|
2406
|
+
*/
|
|
2407
|
+
remove(markerOrMarkerId: Marker | Marker['id']): void;
|
|
2408
|
+
/**
|
|
2409
|
+
* Remove all Markers from all maps.
|
|
2410
|
+
*/
|
|
2411
|
+
removeAll(): void;
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
|
|
2335
2415
|
declare module '@mappedin/mappedin-js/get-venue/Mappedin.types' {
|
|
2336
2416
|
export type TGetVenueOptions = {
|
|
2337
2417
|
accessToken?: string;
|
|
@@ -2629,7 +2709,7 @@ declare module '@mappedin/mappedin-js/get-venue/Mappedin' {
|
|
|
2629
2709
|
hydrateFromMVF(mvfData: MVFData): Promise<undefined>;
|
|
2630
2710
|
/**
|
|
2631
2711
|
*
|
|
2632
|
-
*
|
|
2712
|
+
* @experimental Hydrate the Mappedin instance using a response from either {@link Mappedin.toString}, {@link getVenueBundle} or by downloading the bundle manually
|
|
2633
2713
|
* @param mappedinSerializableData Mappedin data that was serialized or exported as JSON
|
|
2634
2714
|
* @param shouldPopulateBundledImagesAsBlobs Takes the scenes and images from a bundle and maps them as blobs to where they exist as URLs in the bundle. False by default
|
|
2635
2715
|
*/
|
|
@@ -3562,10 +3642,10 @@ declare module '@mappedin/mappedin-js/get-venue/Mappedin.OfflineSearch' {
|
|
|
3562
3642
|
export const removeAccents: (it: string) => string;
|
|
3563
3643
|
export type { SearchOptions };
|
|
3564
3644
|
/**
|
|
3565
|
-
* A {@link
|
|
3645
|
+
* A {@link OfflineSearch} is an offline search module
|
|
3566
3646
|
*
|
|
3567
3647
|
*
|
|
3568
|
-
* @class
|
|
3648
|
+
* @class OfflineSearch
|
|
3569
3649
|
*/
|
|
3570
3650
|
export type TMappedinOfflineSearchAllOptions = {
|
|
3571
3651
|
/**
|
|
@@ -4725,6 +4805,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider'
|
|
|
4725
4805
|
};
|
|
4726
4806
|
flipIfNeeded(): void;
|
|
4727
4807
|
constructor(options: any);
|
|
4808
|
+
setPosition(position: MappedinNode | MappedinCoordinate): void;
|
|
4728
4809
|
setPriority(rank: any): void;
|
|
4729
4810
|
setAction(action: any): void;
|
|
4730
4811
|
resetPriority(): void;
|
|
@@ -6342,6 +6423,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollisionE
|
|
|
6342
6423
|
reposition: () => void;
|
|
6343
6424
|
add: (colliderId: string, collider: ICollider) => void;
|
|
6344
6425
|
remove: (colliderId: string) => void;
|
|
6426
|
+
updateMap: (colliderId: string, from: string, to: string) => void;
|
|
6345
6427
|
update: () => void;
|
|
6346
6428
|
resize: (container: any) => void;
|
|
6347
6429
|
destroy: () => void;
|