@mappedin/mappedin-js 5.3.0 → 5.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.
- package/lib/esm/get-venue/index.d.ts +8 -3
- package/lib/esm/get-venue/index.js +1 -1
- package/lib/esm/navigator/index.js +1 -1
- package/lib/esm/renderer/{browser-NKJ3PSLO.js → browser-QE77AUXN.js} +1 -1
- package/lib/esm/renderer/chunk-3J2OL72L.js +1 -0
- package/lib/esm/renderer/index.d.ts +93 -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-G6EY2P6V.js +0 -1
|
@@ -390,6 +390,19 @@ declare module '@mappedin/mappedin-js/renderer/MapView' {
|
|
|
390
390
|
* @returns MappedinPolygon[]
|
|
391
391
|
*/
|
|
392
392
|
getPolygonsAtCoordinate(coordinate: MappedinCoordinate, options?: TGetPolygonsAtCoordinateOptions): MappedinPolygon[];
|
|
393
|
+
/**
|
|
394
|
+
* Finds all the polygons on a screen coordinate x and y. If multiple
|
|
395
|
+
* polygons are stacked on top of each other, the array of polygons returned will be
|
|
396
|
+
* in the order of farthest to closest.
|
|
397
|
+
*
|
|
398
|
+
* By default, this only considers interactive polygons.
|
|
399
|
+
*
|
|
400
|
+
* @param x
|
|
401
|
+
* @param y
|
|
402
|
+
* @param options {@link TGetPolygonsAtCoordinateOptions}
|
|
403
|
+
* @returns MappedinPolygon[]
|
|
404
|
+
*/
|
|
405
|
+
getPolygonsAtScreenCoordinate(x: number, y: number, options?: TGetPolygonsAtCoordinateOptions): MappedinPolygon[];
|
|
393
406
|
/**
|
|
394
407
|
* Destroy instance and reclaim memory. Note: this does not destroy the instance of {@link Mappedin}
|
|
395
408
|
* that was passed in. For applications that require destroying and re-creating the mapView, it is
|
|
@@ -2028,8 +2041,10 @@ declare module '@mappedin/mappedin-js/renderer/layers/BlueDot' {
|
|
|
2028
2041
|
* @private
|
|
2029
2042
|
*/
|
|
2030
2043
|
constructor(mapView: MapView, core: ICore, eventsLayer: EventSystemLayer);
|
|
2031
|
-
on(eventName:
|
|
2032
|
-
|
|
2044
|
+
on<EVENT_NAME extends E_BLUEDOT_EVENT>(eventName: EVENT_NAME, fn: (payload: E_BLUEDOT_EVENT_PAYLOAD[EVENT_NAME] extends {
|
|
2045
|
+
data: null;
|
|
2046
|
+
} ? E_BLUEDOT_EVENT_PAYLOAD[EVENT_NAME]['data'] : E_BLUEDOT_EVENT_PAYLOAD[EVENT_NAME]) => void): void;
|
|
2047
|
+
off<EVENT_NAME extends E_BLUEDOT_EVENT>(eventName: EVENT_NAME, fn: (payload: E_BLUEDOT_EVENT_PAYLOAD[EVENT_NAME]) => void): void;
|
|
2033
2048
|
/**
|
|
2034
2049
|
* Enables Blue Dot. BlueDot then emits {@link TBlueDotStateChange} and {@link TBlueDotPositionUpdate} events via {@link E_BLUEDOT_EVENT}
|
|
2035
2050
|
*/
|
|
@@ -3230,7 +3245,7 @@ declare module '@mappedin/mappedin-js/get-venue/MappedinNavigatable' {
|
|
|
3230
3245
|
import type { MappedinPolygon } from '@mappedin/mappedin-js/get-venue/MappedinPolygon';
|
|
3231
3246
|
import type { MappedinNode } from '@mappedin/mappedin-js/get-venue/MappedinNode';
|
|
3232
3247
|
import { MappedinDestinationSet } from '@mappedin/mappedin-js/get-venue/MappedinDestinationSet';
|
|
3233
|
-
import
|
|
3248
|
+
import { Mappedin } from '@mappedin/mappedin-js/get-venue/Mappedin';
|
|
3234
3249
|
import { MappedinDirections } from '@mappedin/mappedin-js/get-venue/MappedinDirections';
|
|
3235
3250
|
export type TDirectionToOptions = {
|
|
3236
3251
|
accessible?: boolean;
|
|
@@ -3253,7 +3268,7 @@ declare module '@mappedin/mappedin-js/get-venue/MappedinNavigatable' {
|
|
|
3253
3268
|
}
|
|
3254
3269
|
|
|
3255
3270
|
declare module '@mappedin/mappedin-js/get-venue/Mappedin.CustomerAnalytics' {
|
|
3256
|
-
import { MappedinCategory, MappedinLocation } from '@mappedin/mappedin-js/get-venue';
|
|
3271
|
+
import { MappedinCategory, MappedinLocation, MappedinNavigatable } from '@mappedin/mappedin-js/get-venue';
|
|
3257
3272
|
type AnalyticsOptions = {
|
|
3258
3273
|
clientId?: string;
|
|
3259
3274
|
clientSecret?: string;
|
|
@@ -3267,7 +3282,12 @@ declare module '@mappedin/mappedin-js/get-venue/Mappedin.CustomerAnalytics' {
|
|
|
3267
3282
|
interface IAnalytics {
|
|
3268
3283
|
locationSelected(location: MappedinLocation): void;
|
|
3269
3284
|
categorySelected(category: MappedinCategory): void;
|
|
3270
|
-
|
|
3285
|
+
/**
|
|
3286
|
+
* @hidden
|
|
3287
|
+
* @internal
|
|
3288
|
+
* @deprecated
|
|
3289
|
+
*/
|
|
3290
|
+
getDirections(start: MappedinNavigatable, end: MappedinNavigatable): void;
|
|
3271
3291
|
}
|
|
3272
3292
|
interface IInternalAnalytics extends IAnalytics {
|
|
3273
3293
|
track(target: string, query: any): void;
|
|
@@ -3886,7 +3906,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/pub-sub' {
|
|
|
3886
3906
|
declare module '@mappedin/mappedin-js/renderer/Core.interface' {
|
|
3887
3907
|
import { MappedinMap, Mappedin, MappedinCoordinate, MappedinPolygon, MappedinNode } from '@mappedin/mappedin-js/get-venue';
|
|
3888
3908
|
import { Vector2, Vector3 } from 'three';
|
|
3889
|
-
import { changeListenerFn, TMapViewOptions } from '@mappedin/mappedin-js/renderer/MapView.types';
|
|
3909
|
+
import { changeListenerFn, TGetPolygonsAtCoordinateOptions, TMapViewOptions } from '@mappedin/mappedin-js/renderer/MapView.types';
|
|
3890
3910
|
import RENDER from '@mappedin/mappedin-js/renderer/internal/Mappedin.RenderTasks';
|
|
3891
3911
|
import { INTERNAL_EVENT_PAYLOAD } from '@mappedin/mappedin-js/renderer/MapView';
|
|
3892
3912
|
import { TPadding } from '@mappedin/mappedin-js/renderer';
|
|
@@ -4038,6 +4058,22 @@ declare module '@mappedin/mappedin-js/renderer/Core.interface' {
|
|
|
4038
4058
|
* @param element The node to stop rotating. It won't reset the transform, just leave it as is.
|
|
4039
4059
|
*/
|
|
4040
4060
|
unlockNorth(element: HTMLElement): void;
|
|
4061
|
+
/**
|
|
4062
|
+
* Returns all polygons that contain the specified MappedinCoordinate.
|
|
4063
|
+
*
|
|
4064
|
+
* @param coordinate The MappedinCoordinate to check
|
|
4065
|
+
* @param hoverableMeshChildren
|
|
4066
|
+
* @param options {@link TGetPolygonsAtCoordinateOptions}
|
|
4067
|
+
*/
|
|
4068
|
+
getPolygonsAtScreenCoordinate(coordinate: Vector2, hoverableMeshChildren: any[], options?: TGetPolygonsAtCoordinateOptions): MappedinPolygon[];
|
|
4069
|
+
/**
|
|
4070
|
+
* Returns all polygons at the specified screen coordinate.
|
|
4071
|
+
*
|
|
4072
|
+
* @param coordinate The Vector2 coordinate to check
|
|
4073
|
+
* @param hoverableMeshChildren
|
|
4074
|
+
* @param options {@link TGetPolygonsAtCoordinateOptions}
|
|
4075
|
+
*/
|
|
4076
|
+
getPolygonsAtCoordinate(coordinate: MappedinCoordinate, hoverableMeshChildren: any[], options?: TGetPolygonsAtCoordinateOptions): MappedinPolygon[];
|
|
4041
4077
|
currentInteractionEvent: string;
|
|
4042
4078
|
interactivePolygons: any;
|
|
4043
4079
|
highlightedPolygons: any;
|
|
@@ -4261,7 +4297,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.FloatingLabel'
|
|
|
4261
4297
|
}
|
|
4262
4298
|
export type TFloatingLabelAppearance = {
|
|
4263
4299
|
/**
|
|
4264
|
-
* Margin around the label and marker. This will affect label density
|
|
4300
|
+
* Margin around the label and marker. This will affect label density, with a mininum of 7px around
|
|
4265
4301
|
* @default 6
|
|
4266
4302
|
*/
|
|
4267
4303
|
margin?: number;
|
|
@@ -4319,6 +4355,10 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.FloatingLabel'
|
|
|
4319
4355
|
*/
|
|
4320
4356
|
inactive?: string;
|
|
4321
4357
|
};
|
|
4358
|
+
/**
|
|
4359
|
+
* Size of bounding box of SVG icon
|
|
4360
|
+
*/
|
|
4361
|
+
iconSize?: number;
|
|
4322
4362
|
/**
|
|
4323
4363
|
* SVG of icon to place inside Floating Label
|
|
4324
4364
|
*/
|
|
@@ -4352,6 +4392,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.FloatingLabel'
|
|
|
4352
4392
|
active: string;
|
|
4353
4393
|
inactive: string;
|
|
4354
4394
|
};
|
|
4395
|
+
iconSize?: number;
|
|
4355
4396
|
icon?: string;
|
|
4356
4397
|
iconVisibilityThreshold?: number;
|
|
4357
4398
|
};
|
|
@@ -4416,6 +4457,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.FloatingLabel'
|
|
|
4416
4457
|
static imagePromiseCache: {
|
|
4417
4458
|
[key in number]?: Promise<HTMLImageElement>;
|
|
4418
4459
|
};
|
|
4460
|
+
get pinCanvasSize(): number;
|
|
4419
4461
|
draw(context: CanvasRenderingContext2D): void;
|
|
4420
4462
|
}
|
|
4421
4463
|
export default FloatingLabel;
|
|
@@ -4455,8 +4497,8 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.HTMLCollider' {
|
|
|
4455
4497
|
|
|
4456
4498
|
declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider' {
|
|
4457
4499
|
import SmartCollisionEngine from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollisionEngine';
|
|
4458
|
-
import { Vector3 } from 'three';
|
|
4459
4500
|
import { Rectangle } from '@mappedin/mappedin-js/renderer/internal/quad-tree';
|
|
4501
|
+
import { MappedinCoordinate, MappedinNode } from '@mappedin/mappedin-js/renderer/index.rn';
|
|
4460
4502
|
export type TRange = [number, number, number, number];
|
|
4461
4503
|
type TCustomCollider<T> = ICollider & T;
|
|
4462
4504
|
export type TColliderStrategyProps = {
|
|
@@ -4483,6 +4525,10 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider'
|
|
|
4483
4525
|
'show' = 1,
|
|
4484
4526
|
'hide' = 2
|
|
4485
4527
|
}
|
|
4528
|
+
export type TColliderPosition = {
|
|
4529
|
+
nodeOrCoordinate: MappedinNode | MappedinCoordinate;
|
|
4530
|
+
height?: number;
|
|
4531
|
+
};
|
|
4486
4532
|
export interface ICollider {
|
|
4487
4533
|
dimensions: TDimensions;
|
|
4488
4534
|
screenPosition: [number, number];
|
|
@@ -4501,7 +4547,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider'
|
|
|
4501
4547
|
offscreen?: boolean;
|
|
4502
4548
|
setAction: (action: EColliderAction) => void;
|
|
4503
4549
|
action?: EColliderAction;
|
|
4504
|
-
position:
|
|
4550
|
+
position: TColliderPosition;
|
|
4505
4551
|
__engine?: SmartCollisionEngine;
|
|
4506
4552
|
enable: () => void;
|
|
4507
4553
|
disable: () => void;
|
|
@@ -5818,6 +5864,27 @@ declare module '@mappedin/mappedin-js/renderer/internal/quad-tree' {
|
|
|
5818
5864
|
export { QuadTree, Rectangle };
|
|
5819
5865
|
}
|
|
5820
5866
|
|
|
5867
|
+
declare module '@mappedin/mappedin-js/renderer/index.rn' {
|
|
5868
|
+
import { getVenue, getVenueBundle, Mappedin, MappedinDestinationSet } from '@mappedin/mappedin-js/get-venue';
|
|
5869
|
+
import { randomId } from '@mappedin/mappedin-js/--/common/random-id';
|
|
5870
|
+
export * from '@mappedin/mappedin-js/renderer/MapView.enums';
|
|
5871
|
+
export { getVenue,
|
|
5872
|
+
/**
|
|
5873
|
+
* @deprecated
|
|
5874
|
+
*/
|
|
5875
|
+
getVenueBundle, MappedinDestinationSet, Mappedin, randomId };
|
|
5876
|
+
export { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, E_BLUEDOT_STATE_REASON, E_BLUEDOT_STATE, E_BLUEDOT_MARKER_STATE, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT, E_CAMERA_DIRECTION, SAFE_AREA_INSET_TYPE, ANIMATION_TWEENS, CAMERA_EASING_MODE } from '@mappedin/mappedin-js/renderer/MapView.enums';
|
|
5877
|
+
export { labelThemes } from '@mappedin/mappedin-js/renderer/MapView.types';
|
|
5878
|
+
export type { IFlatLabels } from '@mappedin/mappedin-js/renderer/MapView.FlatLabels';
|
|
5879
|
+
export type { IFloatingLabels } from '@mappedin/mappedin-js/renderer/MapView.FloatingLabels';
|
|
5880
|
+
export type { TBlueDotPositionUpdate, TBlueDotStateChange, TJourneyOptions, TMapViewOptions, TCreateMarkerOptions, TGeolocationObject, TPathOptions, TFlatLabelOptions, TAddFloatingLabelOptions, TAddFlatLabelOptions, TLabelAllLocationCommonOptions, TFloatingLabelAllLocationsOptions, TFlatLabelAllLocationsOptions, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TEnableBlueDotOptions, TFloatingLabelAppearance, TFlatLabelAppearance, CAMERA_EVENT_PAYLOAD, TMapClickEvent, TGetPolygonsAtCoordinateOptions } from '@mappedin/mappedin-js/renderer/MapView.types';
|
|
5881
|
+
export { BEARING_TYPE, ACTION_TYPE } from '@mappedin/mappedin-js/navigator';
|
|
5882
|
+
export type { IDirectionsResult, E_MESSAGES as E_GET_DIRECTIONS_MESSAGES } from '@mappedin/mappedin-js/navigator';
|
|
5883
|
+
export type { TGetVenueBundleOptions, TGetVenueOptions, TMappedinDirective, TShowVenueOptions, TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineSearchAllOptions, TMappedinOfflineAllSearchMatch } from '@mappedin/mappedin-js/get-venue';
|
|
5884
|
+
export { MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinDirections, MappedinNavigatable, MappedinCoordinate, MappedinRankings, MAP_RENDER_MODE, OfflineSearch, MappedinCollectionType } from '@mappedin/mappedin-js/get-venue';
|
|
5885
|
+
export type { TSafeAreaInsets, TCameraTargets, TFocusOnCameraOptions, TCameraTransform, TCameraAnimationOptions } from '@mappedin/mappedin-js/renderer/Camera';
|
|
5886
|
+
}
|
|
5887
|
+
|
|
5821
5888
|
declare module '@mappedin/mappedin-js/navigator/Edge' {
|
|
5822
5889
|
import INode from '@mappedin/mappedin-js/navigator/interfaces/INode';
|
|
5823
5890
|
import IVortex from '@mappedin/mappedin-js/navigator/interfaces/IVortex';
|
|
@@ -5969,27 +6036,6 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.LabelAtlas' {
|
|
|
5969
6036
|
export {};
|
|
5970
6037
|
}
|
|
5971
6038
|
|
|
5972
|
-
declare module '@mappedin/mappedin-js/renderer/index.rn' {
|
|
5973
|
-
import { getVenue, getVenueBundle, Mappedin, MappedinDestinationSet } from '@mappedin/mappedin-js/get-venue';
|
|
5974
|
-
import { randomId } from '@mappedin/mappedin-js/--/common/random-id';
|
|
5975
|
-
export * from '@mappedin/mappedin-js/renderer/MapView.enums';
|
|
5976
|
-
export { getVenue,
|
|
5977
|
-
/**
|
|
5978
|
-
* @deprecated
|
|
5979
|
-
*/
|
|
5980
|
-
getVenueBundle, MappedinDestinationSet, Mappedin, randomId };
|
|
5981
|
-
export { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, E_BLUEDOT_STATE_REASON, E_BLUEDOT_STATE, E_BLUEDOT_MARKER_STATE, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT, E_CAMERA_DIRECTION, SAFE_AREA_INSET_TYPE, ANIMATION_TWEENS, CAMERA_EASING_MODE } from '@mappedin/mappedin-js/renderer/MapView.enums';
|
|
5982
|
-
export { labelThemes } from '@mappedin/mappedin-js/renderer/MapView.types';
|
|
5983
|
-
export type { IFlatLabels } from '@mappedin/mappedin-js/renderer/MapView.FlatLabels';
|
|
5984
|
-
export type { IFloatingLabels } from '@mappedin/mappedin-js/renderer/MapView.FloatingLabels';
|
|
5985
|
-
export type { TBlueDotPositionUpdate, TBlueDotStateChange, TJourneyOptions, TMapViewOptions, TCreateMarkerOptions, TGeolocationObject, TPathOptions, TFlatLabelOptions, TAddFloatingLabelOptions, TAddFlatLabelOptions, TLabelAllLocationCommonOptions, TFloatingLabelAllLocationsOptions, TFlatLabelAllLocationsOptions, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TEnableBlueDotOptions, TFloatingLabelAppearance, TFlatLabelAppearance, CAMERA_EVENT_PAYLOAD, TMapClickEvent, TGetPolygonsAtCoordinateOptions } from '@mappedin/mappedin-js/renderer/MapView.types';
|
|
5986
|
-
export { BEARING_TYPE, ACTION_TYPE } from '@mappedin/mappedin-js/navigator';
|
|
5987
|
-
export type { IDirectionsResult, E_MESSAGES as E_GET_DIRECTIONS_MESSAGES } from '@mappedin/mappedin-js/navigator';
|
|
5988
|
-
export type { TGetVenueBundleOptions, TGetVenueOptions, TMappedinDirective, TShowVenueOptions, TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineSearchAllOptions, TMappedinOfflineAllSearchMatch } from '@mappedin/mappedin-js/get-venue';
|
|
5989
|
-
export { MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinDirections, MappedinNavigatable, MappedinCoordinate, MappedinRankings, MAP_RENDER_MODE, OfflineSearch, MappedinCollectionType } from '@mappedin/mappedin-js/get-venue';
|
|
5990
|
-
export type { TSafeAreaInsets, TCameraTargets, TFocusOnCameraOptions, TCameraTransform, TCameraAnimationOptions } from '@mappedin/mappedin-js/renderer/Camera';
|
|
5991
|
-
}
|
|
5992
|
-
|
|
5993
6039
|
declare module '@mappedin/mappedin-js/renderer/MapView.Scene' {
|
|
5994
6040
|
import { MappedinMap } from '@mappedin/mappedin-js/get-venue';
|
|
5995
6041
|
import { ICore } from '@mappedin/mappedin-js/renderer/Core.interface';
|
|
@@ -6105,7 +6151,24 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.MapObject' {
|
|
|
6105
6151
|
loadMethodUsed: string | undefined;
|
|
6106
6152
|
_dispose(objectToDispose: any): void;
|
|
6107
6153
|
add(childObjectToAdd: any): void;
|
|
6154
|
+
/**
|
|
6155
|
+
* Convert lat/lon to local map position vector
|
|
6156
|
+
*/
|
|
6108
6157
|
getPositionLatLon(lat: any, lon: any): any;
|
|
6158
|
+
/**
|
|
6159
|
+
* Previously, each map was centered around 0,0,0 and scaled to fit the map.
|
|
6160
|
+
* With scene manager, each map is positioned and scaled relative to the base map/world
|
|
6161
|
+
* Since most 3D objects (like blue dot) are added to the map via `getPositionLatLon`, they already
|
|
6162
|
+
* have the map's matrix applied, on top of being affected as a child of the map's own transform
|
|
6163
|
+
* This method inverts the map's matrix to resolve the double matrix application issue.
|
|
6164
|
+
* TODO: investigate a better way to handle this
|
|
6165
|
+
*/
|
|
6166
|
+
addToObject(child: any): void;
|
|
6167
|
+
/**
|
|
6168
|
+
* Translates objects that are added to the map (such as blue dot), assuming they are added via `getPositionLatLon`,
|
|
6169
|
+
* or `convertTo3DMapPosition`, where the map's matrix has already been applied.
|
|
6170
|
+
*/
|
|
6171
|
+
translateChild(child: any, position: any): void;
|
|
6109
6172
|
getMapScale(): null;
|
|
6110
6173
|
getNorth(): null;
|
|
6111
6174
|
disableAllImageFlipping(): void;
|