@mappedin/mappedin-js 4.0.4-alpha.9 → 4.0.8
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 +2 -1
- package/lib/esm/get-venue/index.d.ts +100 -8
- package/lib/esm/get-venue/index.js +1 -1
- package/lib/esm/navigator/index.d.ts +1 -2
- package/lib/esm/navigator/index.js +1 -1
- package/lib/esm/renderer/{Arrival-PQRFDN2N.js → Arrival-PKSG6T4Z.js} +1 -1
- package/lib/esm/renderer/{Chalet-I625SRVG.js → Chalet-VFHRODCH.js} +1 -1
- package/lib/esm/renderer/{HelveticaNeue-HPLP4U3U.js → HelveticaNeue-WCQR4QTH.js} +1 -1
- package/lib/esm/renderer/{Helvetiker-AZQXFYU2.js → Helvetiker-MTC66PG3.js} +1 -1
- package/lib/esm/renderer/{Lato-3C5OKWRN.js → Lato-34YCHTLI.js} +1 -1
- package/lib/esm/renderer/{MyriadPro-UNLJWV6V.js → MyriadPro-CDL2F5Z4.js} +1 -1
- package/lib/esm/renderer/{ProximaNova-OUU6AFAC.js → ProximaNova-LCC2XBMA.js} +1 -1
- package/lib/esm/renderer/{SimonCircular-FGOHD43J.js → SimonCircular-PFENG7AR.js} +1 -1
- package/lib/esm/renderer/chunk-76H4FNT6.js +1 -0
- package/lib/esm/renderer/index.css +1 -1
- package/lib/esm/renderer/index.d.ts +407 -775
- package/lib/esm/renderer/index.js +1 -1
- package/lib/mappedin.css +1 -0
- package/lib/mappedin.js +1 -0
- package/lib/node/index.js +1 -1
- package/package.json +4 -7
- package/lib/esm/renderer/chunk-ASSGPBGM.js +0 -1
- package/lib/iife/renderer/index.css +0 -1
- package/lib/iife/renderer/index.js +0 -1
package/README.md
CHANGED
|
@@ -27,7 +27,8 @@ async function init() {
|
|
|
27
27
|
|
|
28
28
|
const mapView = await showVenue(document.getElementById('mappedin-map'), venueData);
|
|
29
29
|
mapView.labelAllLocations();
|
|
30
|
-
mapView.
|
|
30
|
+
mapView.addInteractivePolygonsForAllLocations();
|
|
31
|
+
mapView.on(E_SDK_EVENT.POLYGON_CLICKED, (polygon) => {
|
|
31
32
|
console.log(`Polygon with id ${polygon.id} clicked!`);
|
|
32
33
|
});
|
|
33
34
|
}
|
|
@@ -54,9 +54,10 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue' {
|
|
|
54
54
|
bundleBaseUri?: string;
|
|
55
55
|
version?: string;
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
57
|
+
* Parse bundle and convert images to blobs. Disabled in React Native
|
|
58
|
+
* @private
|
|
58
59
|
*/
|
|
59
|
-
|
|
60
|
+
shouldPopulateBundledImagesAsBlobs?: boolean;
|
|
60
61
|
};
|
|
61
62
|
/**
|
|
62
63
|
* [experimental] Fetching an offline Venue bundle
|
|
@@ -333,8 +334,10 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin' {
|
|
|
333
334
|
/**
|
|
334
335
|
*
|
|
335
336
|
* [experimental] Hydrate the Mappedin instance using a response from either {@link IMappedin.toString()}, {@link getVenueBundle} or by downloading the bundle manually
|
|
337
|
+
* @param mappedinSerializableData Mappedin data that was serialized or exported as JSON
|
|
338
|
+
* @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
|
|
336
339
|
*/
|
|
337
|
-
hydrate(mappedinSerializableData: string | object): Promise<undefined>;
|
|
340
|
+
hydrate(mappedinSerializableData: string | object, shouldPopulateBundledImagesAsBlobs?: boolean): Promise<undefined>;
|
|
338
341
|
images: any;
|
|
339
342
|
scenes: any;
|
|
340
343
|
fetch(): Promise<void>;
|
|
@@ -409,7 +412,7 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocati
|
|
|
409
412
|
siblingGroups?: TSiblingGroup[] | undefined;
|
|
410
413
|
gallery?: TGalleryImage[] | undefined;
|
|
411
414
|
constructor(mappedin: Mappedin, data: any);
|
|
412
|
-
categories: TCategory[];
|
|
415
|
+
categories: TCategory['id'][];
|
|
413
416
|
/**
|
|
414
417
|
* Polygons this Location is attached to.
|
|
415
418
|
*
|
|
@@ -559,6 +562,14 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNode'
|
|
|
559
562
|
operationHours?: TOpeningHours[];
|
|
560
563
|
externalId?: string;
|
|
561
564
|
constructor(mappedin: Mappedin, data: any);
|
|
565
|
+
/**
|
|
566
|
+
* Latitude of node. This is expensive, especially if doing it for many/all nodes
|
|
567
|
+
*/
|
|
568
|
+
get lat(): number;
|
|
569
|
+
/**
|
|
570
|
+
* Longitude of node. This is expensive, especially if doing it for many/all nodes
|
|
571
|
+
*/
|
|
572
|
+
get lon(): number;
|
|
562
573
|
/**
|
|
563
574
|
* Adjacent Nodes.
|
|
564
575
|
*
|
|
@@ -641,7 +652,7 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinMap' {
|
|
|
641
652
|
import type { MappedinMapGroup } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinMapGroup';
|
|
642
653
|
import { MappedinCoordinate } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinCoordinate';
|
|
643
654
|
/**
|
|
644
|
-
* A {@link MappedinMap} belonging to a specific {@link MappedinVenue}. Typically represents a certain floor. Give this to a {@link
|
|
655
|
+
* A {@link MappedinMap} belonging to a specific {@link MappedinVenue}. Typically represents a certain floor. Give this to a {@link MapView} to display to the user.
|
|
645
656
|
*
|
|
646
657
|
* A Map can have more properties such as 'elevation', 'name' (e.g. Level 1), and 'shortName' (e.g. L1). The elevation property can be used to determine the order of the floors (first, second, etc). Elevation is 0 based, going up and down in integers representing the number of floors above or below 0, which is ground level.
|
|
647
658
|
*
|
|
@@ -685,6 +696,14 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinMap' {
|
|
|
685
696
|
* @property mapGroup {MappedinMapGroup}
|
|
686
697
|
*/
|
|
687
698
|
get mapGroup(): MappedinMapGroup | null;
|
|
699
|
+
/**
|
|
700
|
+
* Create coordinate using mappedin units
|
|
701
|
+
* @internal
|
|
702
|
+
*
|
|
703
|
+
* @param x x of coordinate
|
|
704
|
+
* @param y y of coordinate
|
|
705
|
+
*/
|
|
706
|
+
createCoordinateByXY(x: number, y: number): MappedinCoordinate;
|
|
688
707
|
/**
|
|
689
708
|
* Create coordinate using lat/lon
|
|
690
709
|
*
|
|
@@ -896,6 +915,7 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinDirect
|
|
|
896
915
|
}
|
|
897
916
|
|
|
898
917
|
declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinCoordinate' {
|
|
918
|
+
import { Mappedin, MappedinNode } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue';
|
|
899
919
|
import type { MappedinMap } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinMap';
|
|
900
920
|
/**
|
|
901
921
|
* A {@link MappedinCoordinate} represents a coordinate on a map, created using lat/lon.
|
|
@@ -903,6 +923,7 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinCoordi
|
|
|
903
923
|
* @class MappedinCoordinate
|
|
904
924
|
*/
|
|
905
925
|
export class MappedinCoordinate {
|
|
926
|
+
#private;
|
|
906
927
|
/**
|
|
907
928
|
* ID of Map that the Node is located on.
|
|
908
929
|
*
|
|
@@ -927,7 +948,7 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinCoordi
|
|
|
927
948
|
* Longitude
|
|
928
949
|
*/
|
|
929
950
|
lon: number;
|
|
930
|
-
constructor(lat: number, lon: number, x: number, y: number, map: MappedinMap | string);
|
|
951
|
+
constructor(lat: number, lon: number, x: number, y: number, map: MappedinMap | string, mappedin: Mappedin);
|
|
931
952
|
/**
|
|
932
953
|
*
|
|
933
954
|
* Calculate distance between a coordinate and a {@link MappedinNode} or {@link MappedinCoordinate}
|
|
@@ -936,6 +957,10 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinCoordi
|
|
|
936
957
|
* @returns distance in meters
|
|
937
958
|
*/
|
|
938
959
|
absoluteDistanceTo(destination: MappedinCoordinate): number;
|
|
960
|
+
/**
|
|
961
|
+
* Get Nearest Node to Coordinate, which can then be used for navigation
|
|
962
|
+
*/
|
|
963
|
+
get nearestNode(): MappedinNode;
|
|
939
964
|
}
|
|
940
965
|
}
|
|
941
966
|
|
|
@@ -1018,9 +1043,8 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNaviga
|
|
|
1018
1043
|
declare module '@mappedin/mappedin-js/lib/esm/get-venue/navigator' {
|
|
1019
1044
|
import NavigationGraph from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/NavigationGraph';
|
|
1020
1045
|
import Navigator from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/Navigator';
|
|
1021
|
-
import Directive from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/Directive';
|
|
1022
1046
|
export { ACTION_TYPE, BEARING_TYPE } from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/Directive';
|
|
1023
|
-
export { Navigator, NavigationGraph
|
|
1047
|
+
export { Navigator, NavigationGraph };
|
|
1024
1048
|
export type { IDirectionsResult } from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/Navigator';
|
|
1025
1049
|
export { E_MESSAGES } from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/Navigator';
|
|
1026
1050
|
}
|
|
@@ -1343,6 +1367,74 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/navigator/Directive' {
|
|
|
1343
1367
|
export default Directive;
|
|
1344
1368
|
}
|
|
1345
1369
|
|
|
1370
|
+
declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue' {
|
|
1371
|
+
import type { TGetVenueOptions } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.types';
|
|
1372
|
+
import { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
|
|
1373
|
+
/** Classes */
|
|
1374
|
+
export { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
|
|
1375
|
+
export { MappedinLocation } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocation';
|
|
1376
|
+
export { MappedinPolygon } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinPolygon';
|
|
1377
|
+
export { MappedinNode } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNode';
|
|
1378
|
+
export { MappedinCategory } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinCategory';
|
|
1379
|
+
export { MappedinMap } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinMap';
|
|
1380
|
+
export { MappedinEvent } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinEvent';
|
|
1381
|
+
export { MappedinMapGroup } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinMapGroup';
|
|
1382
|
+
export { MappedinVenue } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinVenue';
|
|
1383
|
+
export { MappedinVortex } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinVortex';
|
|
1384
|
+
export { MappedinDirections } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinDirections';
|
|
1385
|
+
export { MappedinCoordinate } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinCoordinate';
|
|
1386
|
+
export { MappedinRankings } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinRankings';
|
|
1387
|
+
export { MappedinDestinationSet } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinDestinationSet';
|
|
1388
|
+
export { MappedinNavigatable } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNavigatable';
|
|
1389
|
+
export type { TTHINGS } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
|
|
1390
|
+
export type { TMappedinDirective } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinDirections';
|
|
1391
|
+
export type { IDirectionsResult } from '@mappedin/mappedin-js/lib/esm/get-venue/navigator';
|
|
1392
|
+
export type { TOperationHoursMap } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocation';
|
|
1393
|
+
export type { TDirectionToOptions } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNavigatable';
|
|
1394
|
+
/** API data types */
|
|
1395
|
+
export type { TLocationType, TNode, TImage, TLogo, TGalleryImage, TPhone, TSocial, TColor, TVortex, TPicture, TOpeningHours, TSiblingGroup, TState, TCategory, TEvent, TGeoReference, TMap, TMapGroup, TBuilding, TLocation, TPolygon, TPolygonRanking, TVenue, TMappedinAPI } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.API.types';
|
|
1396
|
+
export type { TGetVenueOptions } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.types';
|
|
1397
|
+
export type TShowVenueOptions = {
|
|
1398
|
+
/**
|
|
1399
|
+
* Sets the initial background color of the map, including while loading.
|
|
1400
|
+
*
|
|
1401
|
+
*/
|
|
1402
|
+
backgroundColor?: string;
|
|
1403
|
+
/**
|
|
1404
|
+
* The opacity of the initial background color.
|
|
1405
|
+
*/
|
|
1406
|
+
backgroundAlpha?: number;
|
|
1407
|
+
/**
|
|
1408
|
+
* Whether or not to display labels initially
|
|
1409
|
+
*/
|
|
1410
|
+
labelAllLocationsOnInit?: boolean;
|
|
1411
|
+
/**
|
|
1412
|
+
* The id of the first map to show on map load
|
|
1413
|
+
*/
|
|
1414
|
+
firstMapId?: string;
|
|
1415
|
+
};
|
|
1416
|
+
/**
|
|
1417
|
+
* Get Venue Data for a Mappedin Venue
|
|
1418
|
+
*/
|
|
1419
|
+
export function getVenue(userOptions: TGetVenueOptions): Promise<Mappedin>;
|
|
1420
|
+
export type TGetVenueBundleOptions = TGetVenueOptions & {
|
|
1421
|
+
bundleBaseUri?: string;
|
|
1422
|
+
version?: string;
|
|
1423
|
+
/**
|
|
1424
|
+
* Parse bundle and convert images to blobs. Disabled in React Native
|
|
1425
|
+
* @private
|
|
1426
|
+
*/
|
|
1427
|
+
shouldPopulateBundledImagesAsBlobs?: boolean;
|
|
1428
|
+
};
|
|
1429
|
+
/**
|
|
1430
|
+
* [experimental] Fetching an offline Venue bundle
|
|
1431
|
+
* It is possible to download the venue bundle with all assets built in, which allows for caching/offline solutions.
|
|
1432
|
+
* Note 1: This requires enabling from Mappedin's Customer Solutions team.
|
|
1433
|
+
* Note 2: This may behave a lot slower for large venues, especially those with many images. We are actively working on improving load times.
|
|
1434
|
+
*/
|
|
1435
|
+
export function getVenueBundle(userOptions: TGetVenueBundleOptions): Promise<Mappedin>;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1346
1438
|
declare module '@mappedin/mappedin-js/lib/esm/get-venue/navigator/NavigationGraph' {
|
|
1347
1439
|
import Edge from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/Edge';
|
|
1348
1440
|
import IMap from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/interfaces/IMap';
|