@milemaker/milemaker-js 1.0.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/LICENSE +134 -0
- package/README.md +41 -0
- package/dist/MapProvider/index.d.ts +2453 -0
- package/dist/actions/constants/actions.constants.d.ts +14 -0
- package/dist/actions/constants/index.d.ts +1 -0
- package/dist/actions/index.d.ts +10 -0
- package/dist/actions/layer/baseLayerActions.factory.d.ts +6 -0
- package/dist/actions/layer/index.d.ts +6 -0
- package/dist/actions/layer/trafficLayerActions.factory.d.ts +3 -0
- package/dist/actions/layer/types/index.d.ts +1 -0
- package/dist/actions/layer/types/layerActions.types.d.ts +62 -0
- package/dist/actions/marker/createMarkerAction.factory.d.ts +2 -0
- package/dist/actions/marker/createRouteStopMarkerAction.factory.d.ts +3 -0
- package/dist/actions/marker/createRouteStopMarkersAction.factory.d.ts +3 -0
- package/dist/actions/marker/index.d.ts +3 -0
- package/dist/actions/marker/types/index.d.ts +1 -0
- package/dist/actions/marker/types/markerActions.types.d.ts +217 -0
- package/dist/actions/popup/createPopupAction.factory.d.ts +4 -0
- package/dist/actions/popup/index.d.ts +3 -0
- package/dist/actions/popup/types/index.d.ts +1 -0
- package/dist/actions/popup/types/popupActions.types.d.ts +128 -0
- package/dist/actions/route/createRouteAction.factory.d.ts +3 -0
- package/dist/actions/route/createShapeAction.factory.d.ts +3 -0
- package/dist/actions/route/index.d.ts +3 -0
- package/dist/actions/route/types/index.d.ts +1 -0
- package/dist/actions/route/types/routeActions.types.d.ts +96 -0
- package/dist/actions/types/actions.enums.d.ts +11 -0
- package/dist/actions/types/actions.types.d.ts +60 -0
- package/dist/actions/types/index.d.ts +7 -0
- package/dist/actions/zoom/createZoomActions.factory.d.ts +3 -0
- package/dist/actions/zoom/index.d.ts +2 -0
- package/dist/actions/zoom/types/index.d.ts +1 -0
- package/dist/actions/zoom/types/zoomActions.types.d.ts +76 -0
- package/dist/constants/common.constants.d.ts +4 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/controls/constants/controls.constants.d.ts +8 -0
- package/dist/controls/constants/index.d.ts +1 -0
- package/dist/controls/createAttributionControl.factory.d.ts +4 -0
- package/dist/controls/createBaseLayerControl.factory.d.ts +3 -0
- package/dist/controls/createCurrentPositionControl.factory.d.ts +3 -0
- package/dist/controls/createTrafficLayerControl.factory.d.ts +3 -0
- package/dist/controls/createZoomControl.factory.d.ts +3 -0
- package/dist/controls/index.d.ts +5 -0
- package/dist/controls/types/controls.enums.d.ts +11 -0
- package/dist/controls/types/controls.types.d.ts +121 -0
- package/dist/controls/types/index.d.ts +2 -0
- package/dist/createMap/constants/createMap.constants.d.ts +1 -0
- package/dist/createMap/constants/index.d.ts +1 -0
- package/dist/createMap/createMap.d.ts +23 -0
- package/dist/createMap/index.d.ts +1 -0
- package/dist/createMap/types/createMap.types.d.ts +67 -0
- package/dist/createMap/types/index.d.ts +1 -0
- package/dist/helpers/decodeRoutePolylineString.helper.d.ts +7 -0
- package/dist/helpers/generateUuid.helper.d.ts +1 -0
- package/dist/helpers/getControlAbsolutePosition.helper.d.ts +6 -0
- package/dist/helpers/getDistanceBetweenLonLatLike.helper.d.ts +8 -0
- package/dist/helpers/getIsSupported.helper.d.ts +5 -0
- package/dist/helpers/getMapFlyToAnimationDuration.helper.d.ts +7 -0
- package/dist/helpers/getMapFlyToOptions.helper.d.ts +14 -0
- package/dist/helpers/getNumberOfTimeUnites.helper.d.ts +9 -0
- package/dist/helpers/htmlRender.d.ts +29 -0
- package/dist/helpers/index.d.ts +5 -0
- package/dist/helpers/injectHTMLElement.helper.d.ts +7 -0
- package/dist/helpers/parseLonLatLikeToCoordinates.helper.d.ts +7 -0
- package/dist/helpers/parseLonLatLikeToTuple.helper.d.ts +7 -0
- package/dist/helpers/replaceMatchInSvg.helper.d.ts +16 -0
- package/dist/index.cjs +3944 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +54058 -0
- package/dist/nmaps-gl-5352a2f0.js +4 -0
- package/dist/nmaps-gl-df6fcdba.cjs +1 -0
- package/dist/types/common.enums.d.ts +11 -0
- package/dist/types/common.types.d.ts +59 -0
- package/dist/types/index.d.ts +5 -0
- package/package.json +55 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tuple where first item is longitude and second is latitude
|
|
3
|
+
* @type
|
|
4
|
+
* @group Common
|
|
5
|
+
* @category Types
|
|
6
|
+
*/
|
|
7
|
+
export type LonLatTuple = [
|
|
8
|
+
/**
|
|
9
|
+
* Longitude
|
|
10
|
+
*/
|
|
11
|
+
lon: number,
|
|
12
|
+
/**
|
|
13
|
+
* Latitude
|
|
14
|
+
*/
|
|
15
|
+
lat: number
|
|
16
|
+
];
|
|
17
|
+
/**
|
|
18
|
+
* Coordinate object
|
|
19
|
+
* @interface
|
|
20
|
+
* @group Common
|
|
21
|
+
* @category Interfaces
|
|
22
|
+
*/
|
|
23
|
+
export type Coordinates = {
|
|
24
|
+
/**
|
|
25
|
+
* Latitude
|
|
26
|
+
*/
|
|
27
|
+
lat: number;
|
|
28
|
+
/**
|
|
29
|
+
* Longitude
|
|
30
|
+
*/
|
|
31
|
+
lon: number;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Longitude Latitude object
|
|
35
|
+
* @interface
|
|
36
|
+
* @group Common
|
|
37
|
+
* @category Interfaces
|
|
38
|
+
*/
|
|
39
|
+
export type LngLat = {
|
|
40
|
+
/**
|
|
41
|
+
* Latitude
|
|
42
|
+
*/
|
|
43
|
+
lat: number;
|
|
44
|
+
/**
|
|
45
|
+
* Longitude
|
|
46
|
+
*/
|
|
47
|
+
lng: number;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Longitude LatLatitude ike object
|
|
51
|
+
* Can be a tuple, a coordinate object, or LngLat object
|
|
52
|
+
* {@link LonLatTuple}
|
|
53
|
+
* {@link Coordinates}
|
|
54
|
+
* {@link LngLat}
|
|
55
|
+
* @type
|
|
56
|
+
* @group Common
|
|
57
|
+
* @category Types
|
|
58
|
+
*/
|
|
59
|
+
export type LonLatLike = LonLatTuple | Coordinates | LngLat;
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@milemaker/milemaker-js",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "BSD-3-Clause",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"LICENSE",
|
|
10
|
+
"README.md"
|
|
11
|
+
],
|
|
12
|
+
"keywords": [
|
|
13
|
+
"milemaker",
|
|
14
|
+
"vanila-milemaker-js-sdk",
|
|
15
|
+
"milemaker-js",
|
|
16
|
+
"randmcnally",
|
|
17
|
+
"milemaker-js-sdk"
|
|
18
|
+
],
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "restricted",
|
|
21
|
+
"registry": "https://registry.npmjs.org"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsc -p ./tsconfig.json && vite build --mode production",
|
|
25
|
+
"postbuild": "sh ./scripts/postbuild.sh",
|
|
26
|
+
"build:publish": "yarn build && npm publish"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@googlemaps/polyline-codec": "^1.0.28",
|
|
30
|
+
"lodash": "^4.17.21",
|
|
31
|
+
"uuid": "^9.0.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@ndrive/nmaps-gl": "^1.6.6",
|
|
35
|
+
"@rollup/plugin-typescript": "^11.1.5",
|
|
36
|
+
"@types/lodash": "^4.14.197",
|
|
37
|
+
"@types/node": "^17.0.35",
|
|
38
|
+
"@types/uuid": "^9.0.2",
|
|
39
|
+
"sass": "^1.69.5",
|
|
40
|
+
"tslib": "^2.6.2",
|
|
41
|
+
"typedoc-plugin-missing-exports": "^2.1.0",
|
|
42
|
+
"typescript": "^5.1.6",
|
|
43
|
+
"vite": "^4.4.5",
|
|
44
|
+
"vite-plugin-css-injected-by-js": "^3.3.0"
|
|
45
|
+
},
|
|
46
|
+
"exports": {
|
|
47
|
+
".": {
|
|
48
|
+
"import": "./dist/index.js",
|
|
49
|
+
"require": "./dist/index.cjs"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"index": "./dist/index.cjs",
|
|
53
|
+
"module": "./dist/index.js",
|
|
54
|
+
"typings": "./dist/index.d.ts"
|
|
55
|
+
}
|