@neshan-maps-platform/react-openlayers 2.0.15 → 2.0.16
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 +220 -220
- package/dist/React-Openlayers.js +26 -26
- package/dist/React-Openlayers.umd.cjs +8 -8
- package/dist/types/App.d.ts +3 -3
- package/dist/types/App.model.d.ts +3 -3
- package/dist/types/assets/ol.model.d.ts +130 -130
- package/dist/types/components/Map.d.ts +5 -5
- package/dist/types/components/Map.model.d.ts +55 -55
- package/dist/types/components/index.d.ts +4 -3
- package/dist/types/main.d.ts +1 -1
- package/dist/types/parameters/index.d.ts +47 -47
- package/dist/types/store/ContextProvider.d.ts +3 -3
- package/dist/types/store/ContextProvider.model.d.ts +11 -11
- package/dist/types/store/context.d.ts +11 -11
- package/dist/types/utils/features.util.d.ts +2 -2
- package/dist/types/utils/index.d.ts +7 -7
- package/dist/types/utils/location.util.d.ts +30 -30
- package/package.json +48 -48
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Props } from "../App.model";
|
|
3
|
-
export declare const ContextProvider: (props: Props) => JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Props } from "../App.model";
|
|
3
|
+
export declare const ContextProvider: (props: Props) => JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { MapType, OlMap } from "../components/Map.model";
|
|
2
|
-
export declare type Actions = {
|
|
3
|
-
type: "SET_MAP";
|
|
4
|
-
payload: OlMap;
|
|
5
|
-
} | {
|
|
6
|
-
type: "SET_MAP_TYPE";
|
|
7
|
-
payload: MapType;
|
|
8
|
-
} | {
|
|
9
|
-
type: "SET_MAP_CONTAINER";
|
|
10
|
-
payload: HTMLDivElement;
|
|
11
|
-
};
|
|
1
|
+
import { MapType, OlMap } from "../components/Map.model";
|
|
2
|
+
export declare type Actions = {
|
|
3
|
+
type: "SET_MAP";
|
|
4
|
+
payload: OlMap;
|
|
5
|
+
} | {
|
|
6
|
+
type: "SET_MAP_TYPE";
|
|
7
|
+
payload: MapType;
|
|
8
|
+
} | {
|
|
9
|
+
type: "SET_MAP_CONTAINER";
|
|
10
|
+
payload: HTMLDivElement;
|
|
11
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { MapType, OlMap } from "../components/Map.model";
|
|
3
|
-
declare const Context: import("react").Context<{
|
|
4
|
-
map: OlMap | null;
|
|
5
|
-
mapType: MapType;
|
|
6
|
-
mapContainer: HTMLDivElement | null;
|
|
7
|
-
setMap: (map: OlMap) => void;
|
|
8
|
-
setMapType: (mapType: MapType) => void;
|
|
9
|
-
setMapContainer: (el: HTMLDivElement) => void;
|
|
10
|
-
}>;
|
|
11
|
-
export default Context;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MapType, OlMap } from "../components/Map.model";
|
|
3
|
+
declare const Context: import("react").Context<{
|
|
4
|
+
map: OlMap | null;
|
|
5
|
+
mapType: MapType;
|
|
6
|
+
mapContainer: HTMLDivElement | null;
|
|
7
|
+
setMap: (map: OlMap) => void;
|
|
8
|
+
setMapType: (mapType: MapType) => void;
|
|
9
|
+
setMapContainer: (el: HTMLDivElement) => void;
|
|
10
|
+
}>;
|
|
11
|
+
export default Context;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: {};
|
|
2
|
-
export default _default;
|
|
1
|
+
declare const _default: {};
|
|
2
|
+
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from "./location.util";
|
|
2
|
-
export * from "./features.util";
|
|
3
|
-
/**
|
|
4
|
-
* Tells if current platform is mobile/tablet or a desktop/non-touchable device
|
|
5
|
-
* @returns
|
|
6
|
-
*/
|
|
7
|
-
export declare function isTouchPlatform(): boolean;
|
|
1
|
+
export * from "./location.util";
|
|
2
|
+
export * from "./features.util";
|
|
3
|
+
/**
|
|
4
|
+
* Tells if current platform is mobile/tablet or a desktop/non-touchable device
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export declare function isTouchPlatform(): boolean;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { Coordinate } from "ol/coordinate";
|
|
2
|
-
import { CoordsObj } from "../components/Map.model";
|
|
3
|
-
/**
|
|
4
|
-
* Get the object of location and turns it into array
|
|
5
|
-
* @param loc - location object
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
export declare const sanitizeLocation: (loc?: CoordsObj) => Coordinate | undefined;
|
|
9
|
-
/**
|
|
10
|
-
* Gets the device location
|
|
11
|
-
* if it was succesfull, formats it and returns
|
|
12
|
-
* otherwise, sends Neshan locaton
|
|
13
|
-
* @returns location array
|
|
14
|
-
*/
|
|
15
|
-
export declare const getLocation: () => Promise<Coordinate>;
|
|
16
|
-
/**
|
|
17
|
-
* Create an object for a quick lat lng access
|
|
18
|
-
*/
|
|
19
|
-
export declare const createCoordsObject: () => {
|
|
20
|
-
longitude: number;
|
|
21
|
-
latitude: number;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Transforms common latlng to open layers-friendly latlng
|
|
25
|
-
* @param point
|
|
26
|
-
* @param from
|
|
27
|
-
* @param to
|
|
28
|
-
* @returns points
|
|
29
|
-
*/
|
|
30
|
-
export declare const transformCoords: (point: Coordinate, from?: string, to?: string) => Coordinate;
|
|
1
|
+
import { Coordinate } from "ol/coordinate";
|
|
2
|
+
import { CoordsObj } from "../components/Map.model";
|
|
3
|
+
/**
|
|
4
|
+
* Get the object of location and turns it into array
|
|
5
|
+
* @param loc - location object
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare const sanitizeLocation: (loc?: CoordsObj) => Coordinate | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Gets the device location
|
|
11
|
+
* if it was succesfull, formats it and returns
|
|
12
|
+
* otherwise, sends Neshan locaton
|
|
13
|
+
* @returns location array
|
|
14
|
+
*/
|
|
15
|
+
export declare const getLocation: () => Promise<Coordinate>;
|
|
16
|
+
/**
|
|
17
|
+
* Create an object for a quick lat lng access
|
|
18
|
+
*/
|
|
19
|
+
export declare const createCoordsObject: () => {
|
|
20
|
+
longitude: number;
|
|
21
|
+
latitude: number;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Transforms common latlng to open layers-friendly latlng
|
|
25
|
+
* @param point
|
|
26
|
+
* @param from
|
|
27
|
+
* @param to
|
|
28
|
+
* @returns points
|
|
29
|
+
*/
|
|
30
|
+
export declare const transformCoords: (point: Coordinate, from?: string, to?: string) => Coordinate;
|
package/package.json
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@neshan-maps-platform/react-openlayers",
|
|
3
|
-
"title": "react-neshanmap-openlayers",
|
|
4
|
-
"description": "A react map component wrapping neshan openlayers map.",
|
|
5
|
-
"private": false,
|
|
6
|
-
"version": "2.0.
|
|
7
|
-
"type": "module",
|
|
8
|
-
"types": "./dist/types/components/index.ts",
|
|
9
|
-
"files": [
|
|
10
|
-
"./dist/**"
|
|
11
|
-
],
|
|
12
|
-
"main": "./dist/React-Openlayers.js",
|
|
13
|
-
"module": "./dist/React-Openlayers.js",
|
|
14
|
-
"scripts": {
|
|
15
|
-
"dev": "vite",
|
|
16
|
-
"build": "vite build && tsc",
|
|
17
|
-
"preview": "vite preview",
|
|
18
|
-
"prepublishOnly": "yarn build"
|
|
19
|
-
},
|
|
20
|
-
"peerDependencies": {
|
|
21
|
-
"react": "18.x",
|
|
22
|
-
"react-dom": "18.x"
|
|
23
|
-
},
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"@types/node": "^18.11.18",
|
|
26
|
-
"@types/ol": "5",
|
|
27
|
-
"@types/react": "^18.0.27",
|
|
28
|
-
"@types/react-dom": "^18.0.10",
|
|
29
|
-
"@vitejs/plugin-react": "^3.1.0",
|
|
30
|
-
"react": "^18.2.0",
|
|
31
|
-
"react-dom": "^18.2.0",
|
|
32
|
-
"sass": "^1.58.0",
|
|
33
|
-
"typescript": "^4.9.3",
|
|
34
|
-
"vite": "^4.1.0"
|
|
35
|
-
},
|
|
36
|
-
"keywords": [
|
|
37
|
-
"react",
|
|
38
|
-
"react18",
|
|
39
|
-
"map",
|
|
40
|
-
"neshan",
|
|
41
|
-
"neshan-maps-platform",
|
|
42
|
-
"reactComponent",
|
|
43
|
-
"component",
|
|
44
|
-
"frontend",
|
|
45
|
-
"openlayers",
|
|
46
|
-
"typescript"
|
|
47
|
-
]
|
|
48
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@neshan-maps-platform/react-openlayers",
|
|
3
|
+
"title": "react-neshanmap-openlayers",
|
|
4
|
+
"description": "A react map component wrapping neshan openlayers map.",
|
|
5
|
+
"private": false,
|
|
6
|
+
"version": "2.0.16",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"types": "./dist/types/components/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"./dist/**"
|
|
11
|
+
],
|
|
12
|
+
"main": "./dist/React-Openlayers.js",
|
|
13
|
+
"module": "./dist/React-Openlayers.js",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"dev": "vite",
|
|
16
|
+
"build": "vite build && tsc",
|
|
17
|
+
"preview": "vite preview",
|
|
18
|
+
"prepublishOnly": "yarn build"
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"react": "18.x",
|
|
22
|
+
"react-dom": "18.x"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/node": "^18.11.18",
|
|
26
|
+
"@types/ol": "5",
|
|
27
|
+
"@types/react": "^18.0.27",
|
|
28
|
+
"@types/react-dom": "^18.0.10",
|
|
29
|
+
"@vitejs/plugin-react": "^3.1.0",
|
|
30
|
+
"react": "^18.2.0",
|
|
31
|
+
"react-dom": "^18.2.0",
|
|
32
|
+
"sass": "^1.58.0",
|
|
33
|
+
"typescript": "^4.9.3",
|
|
34
|
+
"vite": "^4.1.0"
|
|
35
|
+
},
|
|
36
|
+
"keywords": [
|
|
37
|
+
"react",
|
|
38
|
+
"react18",
|
|
39
|
+
"map",
|
|
40
|
+
"neshan",
|
|
41
|
+
"neshan-maps-platform",
|
|
42
|
+
"reactComponent",
|
|
43
|
+
"component",
|
|
44
|
+
"frontend",
|
|
45
|
+
"openlayers",
|
|
46
|
+
"typescript"
|
|
47
|
+
]
|
|
48
|
+
}
|