@neshan-maps-platform/react-openlayers 2.0.10 → 2.0.11
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 +214 -173
- package/dist/React-Openlayers.js +212 -211
- package/dist/React-Openlayers.umd.cjs +9 -9
- package/dist/style.css +1 -1
- 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 +131 -0
- package/dist/types/components/Map.d.ts +5 -5
- package/dist/types/components/Map.model.d.ts +55 -89
- package/dist/types/components/index.d.ts +3 -2
- 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 -51
|
@@ -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,51 +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-NeshanMap-Openlayers.js",
|
|
13
|
-
"module": "./dist/React-NeshanMap-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
|
-
"react": "^18.2.0",
|
|
26
|
-
"react-dom": "^18.2.0",
|
|
27
|
-
"@types/node": "^18.11.18",
|
|
28
|
-
"@types/ol": "^6.5.3",
|
|
29
|
-
"@types/react": "^18.0.27",
|
|
30
|
-
"@types/react-dom": "^18.0.10",
|
|
31
|
-
"@vitejs/plugin-react": "^3.1.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
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"mapbox"
|
|
50
|
-
]
|
|
51
|
-
}
|
|
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.11",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"types": "./dist/types/components/index.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"./dist/**"
|
|
11
|
+
],
|
|
12
|
+
"main": "./dist/React-NeshanMap-Openlayers.js",
|
|
13
|
+
"module": "./dist/React-NeshanMap-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
|
+
"react": "^18.2.0",
|
|
26
|
+
"react-dom": "^18.2.0",
|
|
27
|
+
"@types/node": "^18.11.18",
|
|
28
|
+
"@types/ol": "^6.5.3",
|
|
29
|
+
"@types/react": "^18.0.27",
|
|
30
|
+
"@types/react-dom": "^18.0.10",
|
|
31
|
+
"@vitejs/plugin-react": "^3.1.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
|
+
}
|