@mappedin/react-native-sdk 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/dist/index.d.ts +90 -9
- package/dist/index.js +195 -195
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -305,6 +305,10 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
|
|
|
305
305
|
* Get all polygons that intersect with a specific coordinate.
|
|
306
306
|
*/
|
|
307
307
|
getPolygonsAtCoordinate(coordinate: MappedinCoordinate, options?: TGetPolygonsAtCoordinateOptions): Promise<MappedinPolygon[]>;
|
|
308
|
+
/**
|
|
309
|
+
* Get all polygons that intersect with a specific screen coordinate.
|
|
310
|
+
*/
|
|
311
|
+
getPolygonsAtScreenCoordinate(x: number, y: number, options?: TGetPolygonsAtCoordinateOptions): Promise<MappedinPolygon[]>;
|
|
308
312
|
/**
|
|
309
313
|
Camera controls interface
|
|
310
314
|
*/
|
|
@@ -1867,6 +1871,7 @@ declare module '@mappedin/react-native-sdk/wrappers/common/events' {
|
|
|
1867
1871
|
ADD_SEARCH_QUERY = "ADD_SEARCH_QUERY",
|
|
1868
1872
|
CLICK = "CLICK",
|
|
1869
1873
|
GET_POLYGONS_AT_COORDINATE = "GET_POLYGONS_AT_COORDINATE",
|
|
1874
|
+
GET_POLYGONS_AT_SCREEN_COORDINATE = "GET_POLYGONS_AT_SCREEN_COORDINATE",
|
|
1870
1875
|
CREATE_TOOLTIP = "CREATE_TOOLTIP",
|
|
1871
1876
|
CREATE_CUSTOM_TOOLTIP = "CREATE_CUSTOM_TOOLTIP",
|
|
1872
1877
|
REMOVE_TOOLTIP = "REMOVE_TOOLTIP"
|
|
@@ -2204,6 +2209,11 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
|
|
|
2204
2209
|
coordinate: TSerializedCoordinate;
|
|
2205
2210
|
options?: TGetPolygonsAtCoordinateOptions;
|
|
2206
2211
|
};
|
|
2212
|
+
[EVENT.GET_POLYGONS_AT_SCREEN_COORDINATE]: {
|
|
2213
|
+
x: number;
|
|
2214
|
+
y: number;
|
|
2215
|
+
options?: TGetPolygonsAtCoordinateOptions;
|
|
2216
|
+
};
|
|
2207
2217
|
[EVENT.CREATE_TOOLTIP]: {
|
|
2208
2218
|
nodeOrCoordinate: TSerializedNode | TSerializedCoordinate;
|
|
2209
2219
|
contentHtml: string;
|
|
@@ -2309,7 +2319,7 @@ declare module '@mappedin/react-native-sdk/wrappers/common/pub-sub' {
|
|
|
2309
2319
|
declare module '@mappedin/react-native-sdk/core/packages/renderer/Core.interface' {
|
|
2310
2320
|
import { MappedinMap, Mappedin, MappedinCoordinate, MappedinPolygon, MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue';
|
|
2311
2321
|
import { Vector2, Vector3 } from 'three';
|
|
2312
|
-
import { changeListenerFn, TMapViewOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
|
|
2322
|
+
import { changeListenerFn, TGetPolygonsAtCoordinateOptions, TMapViewOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
|
|
2313
2323
|
import RENDER from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.RenderTasks';
|
|
2314
2324
|
import { INTERNAL_EVENT_PAYLOAD } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
|
|
2315
2325
|
import { TPadding } from '@mappedin/react-native-sdk/core/packages/renderer';
|
|
@@ -2461,6 +2471,22 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Core.interface
|
|
|
2461
2471
|
* @param element The node to stop rotating. It won't reset the transform, just leave it as is.
|
|
2462
2472
|
*/
|
|
2463
2473
|
unlockNorth(element: HTMLElement): void;
|
|
2474
|
+
/**
|
|
2475
|
+
* Returns all polygons that contain the specified MappedinCoordinate.
|
|
2476
|
+
*
|
|
2477
|
+
* @param coordinate The MappedinCoordinate to check
|
|
2478
|
+
* @param hoverableMeshChildren
|
|
2479
|
+
* @param options {@link TGetPolygonsAtCoordinateOptions}
|
|
2480
|
+
*/
|
|
2481
|
+
getPolygonsAtScreenCoordinate(coordinate: Vector2, hoverableMeshChildren: any[], options?: TGetPolygonsAtCoordinateOptions): MappedinPolygon[];
|
|
2482
|
+
/**
|
|
2483
|
+
* Returns all polygons at the specified screen coordinate.
|
|
2484
|
+
*
|
|
2485
|
+
* @param coordinate The Vector2 coordinate to check
|
|
2486
|
+
* @param hoverableMeshChildren
|
|
2487
|
+
* @param options {@link TGetPolygonsAtCoordinateOptions}
|
|
2488
|
+
*/
|
|
2489
|
+
getPolygonsAtCoordinate(coordinate: MappedinCoordinate, hoverableMeshChildren: any[], options?: TGetPolygonsAtCoordinateOptions): MappedinPolygon[];
|
|
2464
2490
|
currentInteractionEvent: string;
|
|
2465
2491
|
interactivePolygons: any;
|
|
2466
2492
|
highlightedPolygons: any;
|
|
@@ -3072,6 +3098,14 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
|
|
|
3072
3098
|
options?: import("../../core/packages/renderer").TGetPolygonsAtCoordinateOptions | undefined;
|
|
3073
3099
|
};
|
|
3074
3100
|
};
|
|
3101
|
+
GET_POLYGONS_AT_SCREEN_COORDINATE: {
|
|
3102
|
+
msgID?: string | undefined;
|
|
3103
|
+
data: {
|
|
3104
|
+
x: number;
|
|
3105
|
+
y: number;
|
|
3106
|
+
options?: import("../../core/packages/renderer").TGetPolygonsAtCoordinateOptions | undefined;
|
|
3107
|
+
};
|
|
3108
|
+
};
|
|
3075
3109
|
CREATE_TOOLTIP: {
|
|
3076
3110
|
msgID?: string | undefined;
|
|
3077
3111
|
data: {
|
|
@@ -3176,7 +3210,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
|
|
|
3176
3210
|
}
|
|
3177
3211
|
export type TFloatingLabelAppearance = {
|
|
3178
3212
|
/**
|
|
3179
|
-
* Margin around the label and marker. This will affect label density
|
|
3213
|
+
* Margin around the label and marker. This will affect label density, with a mininum of 7px around
|
|
3180
3214
|
* @default 6
|
|
3181
3215
|
*/
|
|
3182
3216
|
margin?: number;
|
|
@@ -3234,6 +3268,10 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
|
|
|
3234
3268
|
*/
|
|
3235
3269
|
inactive?: string;
|
|
3236
3270
|
};
|
|
3271
|
+
/**
|
|
3272
|
+
* Size of bounding box of SVG icon
|
|
3273
|
+
*/
|
|
3274
|
+
iconSize?: number;
|
|
3237
3275
|
/**
|
|
3238
3276
|
* SVG of icon to place inside Floating Label
|
|
3239
3277
|
*/
|
|
@@ -3267,6 +3305,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
|
|
|
3267
3305
|
active: string;
|
|
3268
3306
|
inactive: string;
|
|
3269
3307
|
};
|
|
3308
|
+
iconSize?: number;
|
|
3270
3309
|
icon?: string;
|
|
3271
3310
|
iconVisibilityThreshold?: number;
|
|
3272
3311
|
};
|
|
@@ -3331,6 +3370,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
|
|
|
3331
3370
|
static imagePromiseCache: {
|
|
3332
3371
|
[key in number]?: Promise<HTMLImageElement>;
|
|
3333
3372
|
};
|
|
3373
|
+
get pinCanvasSize(): number;
|
|
3334
3374
|
draw(context: CanvasRenderingContext2D): void;
|
|
3335
3375
|
}
|
|
3336
3376
|
export default FloatingLabel;
|
|
@@ -3597,8 +3637,10 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/layers/BlueDot
|
|
|
3597
3637
|
* @private
|
|
3598
3638
|
*/
|
|
3599
3639
|
constructor(mapView: MapView, core: ICore, eventsLayer: EventSystemLayer);
|
|
3600
|
-
on(eventName:
|
|
3601
|
-
|
|
3640
|
+
on<EVENT_NAME extends E_BLUEDOT_EVENT>(eventName: EVENT_NAME, fn: (payload: E_BLUEDOT_EVENT_PAYLOAD[EVENT_NAME] extends {
|
|
3641
|
+
data: null;
|
|
3642
|
+
} ? E_BLUEDOT_EVENT_PAYLOAD[EVENT_NAME]['data'] : E_BLUEDOT_EVENT_PAYLOAD[EVENT_NAME]) => void): void;
|
|
3643
|
+
off<EVENT_NAME extends E_BLUEDOT_EVENT>(eventName: EVENT_NAME, fn: (payload: E_BLUEDOT_EVENT_PAYLOAD[EVENT_NAME]) => void): void;
|
|
3602
3644
|
/**
|
|
3603
3645
|
* Enables Blue Dot. BlueDot then emits {@link TBlueDotStateChange} and {@link TBlueDotPositionUpdate} events via {@link E_BLUEDOT_EVENT}
|
|
3604
3646
|
*/
|
|
@@ -4785,7 +4827,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNavig
|
|
|
4785
4827
|
import type { MappedinPolygon } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinPolygon';
|
|
4786
4828
|
import type { MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNode';
|
|
4787
4829
|
import { MappedinDestinationSet } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinDestinationSet';
|
|
4788
|
-
import
|
|
4830
|
+
import { Mappedin } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin';
|
|
4789
4831
|
import { MappedinDirections } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinDirections';
|
|
4790
4832
|
export type TDirectionToOptions = {
|
|
4791
4833
|
accessible?: boolean;
|
|
@@ -4808,7 +4850,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNavig
|
|
|
4808
4850
|
}
|
|
4809
4851
|
|
|
4810
4852
|
declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.CustomerAnalytics' {
|
|
4811
|
-
import { MappedinCategory, MappedinLocation } from '@mappedin/react-native-sdk/core/packages/get-venue';
|
|
4853
|
+
import { MappedinCategory, MappedinLocation, MappedinNavigatable } from '@mappedin/react-native-sdk/core/packages/get-venue';
|
|
4812
4854
|
type AnalyticsOptions = {
|
|
4813
4855
|
clientId?: string;
|
|
4814
4856
|
clientSecret?: string;
|
|
@@ -4822,7 +4864,12 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.Cust
|
|
|
4822
4864
|
interface IAnalytics {
|
|
4823
4865
|
locationSelected(location: MappedinLocation): void;
|
|
4824
4866
|
categorySelected(category: MappedinCategory): void;
|
|
4825
|
-
|
|
4867
|
+
/**
|
|
4868
|
+
* @hidden
|
|
4869
|
+
* @internal
|
|
4870
|
+
* @deprecated
|
|
4871
|
+
*/
|
|
4872
|
+
getDirections(start: MappedinNavigatable, end: MappedinNavigatable): void;
|
|
4826
4873
|
}
|
|
4827
4874
|
interface IInternalAnalytics extends IAnalytics {
|
|
4828
4875
|
track(target: string, query: any): void;
|
|
@@ -5985,6 +6032,19 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView' {
|
|
|
5985
6032
|
* @returns MappedinPolygon[]
|
|
5986
6033
|
*/
|
|
5987
6034
|
getPolygonsAtCoordinate(coordinate: MappedinCoordinate, options?: TGetPolygonsAtCoordinateOptions): MappedinPolygon[];
|
|
6035
|
+
/**
|
|
6036
|
+
* Finds all the polygons on a screen coordinate x and y. If multiple
|
|
6037
|
+
* polygons are stacked on top of each other, the array of polygons returned will be
|
|
6038
|
+
* in the order of farthest to closest.
|
|
6039
|
+
*
|
|
6040
|
+
* By default, this only considers interactive polygons.
|
|
6041
|
+
*
|
|
6042
|
+
* @param x
|
|
6043
|
+
* @param y
|
|
6044
|
+
* @param options {@link TGetPolygonsAtCoordinateOptions}
|
|
6045
|
+
* @returns MappedinPolygon[]
|
|
6046
|
+
*/
|
|
6047
|
+
getPolygonsAtScreenCoordinate(x: number, y: number, options?: TGetPolygonsAtCoordinateOptions): MappedinPolygon[];
|
|
5988
6048
|
/**
|
|
5989
6049
|
* Destroy instance and reclaim memory. Note: this does not destroy the instance of {@link Mappedin}
|
|
5990
6050
|
* that was passed in. For applications that require destroying and re-creating the mapView, it is
|
|
@@ -6560,8 +6620,8 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.SceneM
|
|
|
6560
6620
|
|
|
6561
6621
|
declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollider' {
|
|
6562
6622
|
import SmartCollisionEngine from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollisionEngine';
|
|
6563
|
-
import { Vector3 } from 'three';
|
|
6564
6623
|
import { Rectangle } from '@mappedin/react-native-sdk/core/packages/renderer/internal/quad-tree';
|
|
6624
|
+
import { MappedinCoordinate, MappedinNode } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
|
|
6565
6625
|
export type TRange = [number, number, number, number];
|
|
6566
6626
|
type TCustomCollider<T> = ICollider & T;
|
|
6567
6627
|
export type TColliderStrategyProps = {
|
|
@@ -6588,6 +6648,10 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
|
|
|
6588
6648
|
'show' = 1,
|
|
6589
6649
|
'hide' = 2
|
|
6590
6650
|
}
|
|
6651
|
+
export type TColliderPosition = {
|
|
6652
|
+
nodeOrCoordinate: MappedinNode | MappedinCoordinate;
|
|
6653
|
+
height?: number;
|
|
6654
|
+
};
|
|
6591
6655
|
export interface ICollider {
|
|
6592
6656
|
dimensions: TDimensions;
|
|
6593
6657
|
screenPosition: [number, number];
|
|
@@ -6606,7 +6670,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
|
|
|
6606
6670
|
offscreen?: boolean;
|
|
6607
6671
|
setAction: (action: EColliderAction) => void;
|
|
6608
6672
|
action?: EColliderAction;
|
|
6609
|
-
position:
|
|
6673
|
+
position: TColliderPosition;
|
|
6610
6674
|
__engine?: SmartCollisionEngine;
|
|
6611
6675
|
enable: () => void;
|
|
6612
6676
|
disable: () => void;
|
|
@@ -7710,7 +7774,24 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
|
|
|
7710
7774
|
loadMethodUsed: string | undefined;
|
|
7711
7775
|
_dispose(objectToDispose: any): void;
|
|
7712
7776
|
add(childObjectToAdd: any): void;
|
|
7777
|
+
/**
|
|
7778
|
+
* Convert lat/lon to local map position vector
|
|
7779
|
+
*/
|
|
7713
7780
|
getPositionLatLon(lat: any, lon: any): any;
|
|
7781
|
+
/**
|
|
7782
|
+
* Previously, each map was centered around 0,0,0 and scaled to fit the map.
|
|
7783
|
+
* With scene manager, each map is positioned and scaled relative to the base map/world
|
|
7784
|
+
* Since most 3D objects (like blue dot) are added to the map via `getPositionLatLon`, they already
|
|
7785
|
+
* have the map's matrix applied, on top of being affected as a child of the map's own transform
|
|
7786
|
+
* This method inverts the map's matrix to resolve the double matrix application issue.
|
|
7787
|
+
* TODO: investigate a better way to handle this
|
|
7788
|
+
*/
|
|
7789
|
+
addToObject(child: any): void;
|
|
7790
|
+
/**
|
|
7791
|
+
* Translates objects that are added to the map (such as blue dot), assuming they are added via `getPositionLatLon`,
|
|
7792
|
+
* or `convertTo3DMapPosition`, where the map's matrix has already been applied.
|
|
7793
|
+
*/
|
|
7794
|
+
translateChild(child: any, position: any): void;
|
|
7714
7795
|
getMapScale(): null;
|
|
7715
7796
|
getNorth(): null;
|
|
7716
7797
|
disableAllImageFlipping(): void;
|