@neshan-maps-platform/react-openlayers 2.0.14 → 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.
@@ -1,131 +1,130 @@
1
- import mainOl from "ol";
2
- import { OlMap } from "@/components";
3
- import * as array from "ol/array.js";
4
- import * as asserts from "ol/asserts.js";
5
- import * as CenterConstraint from "ol/centerconstraint.js";
6
- import CollectionEventType from "ol/CollectionEventType.js";
7
- import * as color from "ol/color.js";
8
- import * as colorlike from "ol/colorlike.js";
9
- import * as control from "ol/control.js";
10
- import * as coordinate from "ol/coordinate.js";
11
- import * as css from "ol/css.js";
12
- import * as dom from "ol/dom.js";
13
- import * as easing from "ol/easing.js";
14
- import * as events from "ol/events.js";
15
- import * as extent from "ol/extent.js";
16
- import * as featureloader from "ol/featureloader.js";
17
- import * as format from "ol/format.js";
18
- import * as functions from "ol/functions.js";
19
- import * as geom from "ol/geom.js";
20
- import * as has from "ol/has.js";
21
- import ImageState from "ol/ImageState.js";
22
- import * as interaction from "ol/interaction.js";
23
- import * as layer from "ol/layer.js";
24
- import * as loadingstrategy from "ol/loadingstrategy.js";
25
- import MapBrowserEventType from "ol/MapBrowserEventType.js";
26
- import MapEventType from "ol/MapEventType.js";
27
- import MapProperty from "ol/MapProperty.js";
28
- import * as math from "ol/math.js";
29
- import * as net from "ol/net.js";
30
- import * as obj from "ol/obj.js";
31
- import ObjectEventType from "ol/ObjectEventType.js";
32
- import * as pixel from "ol/pixel.js";
33
- import * as proj from "ol/proj.js";
34
- import * as render from "ol/render.js";
35
- import * as reproj from "ol/reproj.js";
36
- import * as resolutionconstraint from "ol/resolutionconstraint.js";
37
- import * as rotationconstraint from "ol/rotationconstraint.js";
38
- import * as size from "ol/size.js";
39
- import * as source from "ol/source.js";
40
- import * as sphere from "ol/sphere.js";
41
- import * as string from "ol/string.js";
42
- import * as style from "ol/style.js";
43
- import * as tilecoord from "ol/tilecoord.js";
44
- import * as tilegrid from "ol/tilegrid.js";
45
- import TileState from "ol/TileState.js";
46
- import * as TileUrlFunction from "ol/tileurlfunction.js";
47
- import * as transform from "ol/transform.js";
48
- import * as uri from "ol/uri.js";
49
- import ViewHint from "ol/ViewHint.js";
50
- import ViewProperty from "ol/ViewProperty.js";
51
- import * as webgl from "ol/webgl.js";
52
- import * as xml from "ol/xml.js";
53
- export declare type Ol = {
54
- Map: typeof OlMap;
55
- array: typeof array;
56
- asserts: typeof asserts;
57
- CenterConstraint: typeof CenterConstraint;
58
- CollectionEventType: typeof CollectionEventType;
59
- color: typeof color;
60
- colorlike: typeof colorlike;
61
- control: typeof control;
62
- coordinate: typeof coordinate;
63
- css: typeof css;
64
- dom: typeof dom;
65
- easing: typeof easing;
66
- events: typeof events;
67
- extent: typeof extent;
68
- featureloader: typeof featureloader;
69
- format: typeof format;
70
- functions: typeof functions;
71
- geom: typeof geom;
72
- has: typeof has;
73
- ImageState: typeof ImageState;
74
- interaction: typeof interaction;
75
- layer: typeof layer;
76
- loadingstrategy: typeof loadingstrategy;
77
- MapBrowserEventType: typeof MapBrowserEventType;
78
- MapEventType: typeof MapEventType;
79
- MapProperty: typeof MapProperty;
80
- math: typeof math;
81
- net: typeof net;
82
- obj: typeof obj;
83
- ObjectEventType: typeof ObjectEventType;
84
- pixel: typeof pixel;
85
- proj: typeof proj;
86
- render: typeof render;
87
- reproj: typeof reproj;
88
- resolutionconstraint: typeof resolutionconstraint;
89
- rotationconstraint: typeof rotationconstraint;
90
- size: typeof size;
91
- source: typeof source;
92
- sphere: typeof sphere;
93
- string: typeof string;
94
- style: typeof style;
95
- tilecoord: typeof tilecoord;
96
- tilegrid: typeof tilegrid;
97
- TileState: typeof TileState;
98
- TileUrlFunction: typeof TileUrlFunction;
99
- transform: typeof transform;
100
- uri: typeof uri;
101
- ViewHint: typeof ViewHint;
102
- ViewProperty: typeof ViewProperty;
103
- webgl: typeof webgl;
104
- xml: typeof xml;
105
- AssertionError: typeof mainOl.AssertionError;
106
- Collection: typeof mainOl.Collection;
107
- Disposable: typeof mainOl.Disposable;
108
- Feature: typeof mainOl.Feature;
109
- Geolocation: typeof mainOl.Geolocation;
110
- Graticule: typeof mainOl.Graticule;
111
- Image: typeof mainOl.Image;
112
- ImageBase: typeof mainOl.ImageBase;
113
- ImageCanvas: typeof mainOl.ImageCanvas;
114
- ImageTile: typeof mainOl.ImageTile;
115
- Kinetic: typeof mainOl.Kinetic;
116
- MapBrowserEvent: typeof mainOl.MapBrowserEvent;
117
- MapBrowserEventHandler: typeof mainOl.MapBrowserEventHandler;
118
- MapEvent: typeof mainOl.MapEvent;
119
- Object: typeof mainOl.Object;
120
- Observable: typeof mainOl.Observable;
121
- Overlay: typeof mainOl.Overlay;
122
- Tile: typeof mainOl.Tile;
123
- TileCache: typeof mainOl.TileCache;
124
- TileQueue: typeof mainOl.TileQueue;
125
- TileRange: typeof mainOl.TileRange;
126
- VectorRenderTile: typeof mainOl.VectorRenderTile;
127
- VectorTile: typeof mainOl.VectorTile;
128
- View: typeof mainOl.View;
129
- getUid: typeof mainOl.getUid;
130
- VERSION: string;
131
- };
1
+ import mainOl from "ol";
2
+ import { OlMap } from "@/components";
3
+ import * as array from "ol/array.js";
4
+ import * as asserts from "ol/asserts.js";
5
+ import * as CenterConstraint from "ol/centerconstraint.js";
6
+ import CollectionEventType from "ol/CollectionEventType.js";
7
+ import * as color from "ol/color.js";
8
+ import * as colorlike from "ol/colorlike.js";
9
+ import * as control from "ol/control.js";
10
+ import * as coordinate from "ol/coordinate.js";
11
+ import * as css from "ol/css.js";
12
+ import * as dom from "ol/dom.js";
13
+ import * as easing from "ol/easing.js";
14
+ import * as events from "ol/events.js";
15
+ import * as extent from "ol/extent.js";
16
+ import * as featureloader from "ol/featureloader.js";
17
+ import * as format from "ol/format.js";
18
+ import * as functions from "ol/functions.js";
19
+ import * as geom from "ol/geom.js";
20
+ import * as has from "ol/has.js";
21
+ import ImageState from "ol/ImageState.js";
22
+ import * as interaction from "ol/interaction.js";
23
+ import * as layer from "ol/layer.js";
24
+ import * as loadingstrategy from "ol/loadingstrategy.js";
25
+ import MapBrowserEventType from "ol/MapBrowserEventType.js";
26
+ import MapEventType from "ol/MapEventType.js";
27
+ import MapProperty from "ol/MapProperty.js";
28
+ import * as math from "ol/math.js";
29
+ import * as net from "ol/net.js";
30
+ import * as obj from "ol/obj.js";
31
+ import ObjectEventType from "ol/ObjectEventType.js";
32
+ import * as pixel from "ol/pixel.js";
33
+ import * as proj from "ol/proj.js";
34
+ import * as render from "ol/render.js";
35
+ import * as reproj from "ol/reproj.js";
36
+ import * as resolutionconstraint from "ol/resolutionconstraint.js";
37
+ import * as rotationconstraint from "ol/rotationconstraint.js";
38
+ import * as size from "ol/size.js";
39
+ import * as source from "ol/source.js";
40
+ import * as sphere from "ol/sphere.js";
41
+ import * as string from "ol/string.js";
42
+ import * as style from "ol/style.js";
43
+ import * as tilecoord from "ol/tilecoord.js";
44
+ import * as tilegrid from "ol/tilegrid.js";
45
+ import TileState from "ol/TileState.js";
46
+ import * as TileUrlFunction from "ol/tileurlfunction.js";
47
+ import * as transform from "ol/transform.js";
48
+ import * as uri from "ol/uri.js";
49
+ import ViewHint from "ol/ViewHint.js";
50
+ import ViewProperty from "ol/ViewProperty.js";
51
+ import * as webgl from "ol/webgl.js";
52
+ import * as xml from "ol/xml.js";
53
+ export declare type Ol = {
54
+ Map: typeof OlMap;
55
+ array: typeof array;
56
+ asserts: typeof asserts;
57
+ CenterConstraint: typeof CenterConstraint;
58
+ CollectionEventType: typeof CollectionEventType;
59
+ color: typeof color;
60
+ colorlike: typeof colorlike;
61
+ control: typeof control;
62
+ coordinate: typeof coordinate;
63
+ css: typeof css;
64
+ dom: typeof dom;
65
+ easing: typeof easing;
66
+ events: typeof events;
67
+ extent: typeof extent;
68
+ featureloader: typeof featureloader;
69
+ format: typeof format;
70
+ functions: typeof functions;
71
+ geom: typeof geom;
72
+ has: typeof has;
73
+ ImageState: typeof ImageState;
74
+ interaction: typeof interaction;
75
+ layer: typeof layer;
76
+ loadingstrategy: typeof loadingstrategy;
77
+ MapBrowserEventType: typeof MapBrowserEventType;
78
+ MapEventType: typeof MapEventType;
79
+ MapProperty: typeof MapProperty;
80
+ math: typeof math;
81
+ net: typeof net;
82
+ obj: typeof obj;
83
+ ObjectEventType: typeof ObjectEventType;
84
+ pixel: typeof pixel;
85
+ proj: typeof proj;
86
+ render: typeof render;
87
+ reproj: typeof reproj;
88
+ resolutionconstraint: typeof resolutionconstraint;
89
+ rotationconstraint: typeof rotationconstraint;
90
+ size: typeof size;
91
+ source: typeof source;
92
+ sphere: typeof sphere;
93
+ string: typeof string;
94
+ style: typeof style;
95
+ tilecoord: typeof tilecoord;
96
+ tilegrid: typeof tilegrid;
97
+ TileState: typeof TileState;
98
+ TileUrlFunction: typeof TileUrlFunction;
99
+ transform: typeof transform;
100
+ uri: typeof uri;
101
+ ViewHint: typeof ViewHint;
102
+ ViewProperty: typeof ViewProperty;
103
+ webgl: typeof webgl;
104
+ xml: typeof xml;
105
+ AssertionError: typeof mainOl.AssertionError;
106
+ Collection: typeof mainOl.Collection;
107
+ Disposable: typeof mainOl.Disposable;
108
+ Feature: typeof mainOl.Feature;
109
+ Geolocation: typeof mainOl.Geolocation;
110
+ Graticule: typeof mainOl.Graticule;
111
+ Image: typeof mainOl.Image;
112
+ ImageBase: typeof mainOl.ImageBase;
113
+ ImageCanvas: typeof mainOl.ImageCanvas;
114
+ ImageTile: typeof mainOl.ImageTile;
115
+ Kinetic: typeof mainOl.Kinetic;
116
+ MapBrowserEvent: typeof mainOl.MapBrowserEvent;
117
+ MapBrowserEventHandler: typeof mainOl.MapBrowserEventHandler;
118
+ MapEvent: typeof mainOl.MapEvent;
119
+ Object: typeof mainOl.Object;
120
+ Observable: typeof mainOl.Observable;
121
+ Overlay: typeof mainOl.Overlay;
122
+ Tile: typeof mainOl.Tile;
123
+ TileCache: typeof mainOl.TileCache;
124
+ TileQueue: typeof mainOl.TileQueue;
125
+ TileRange: typeof mainOl.TileRange;
126
+ VectorTile: typeof mainOl.VectorTile;
127
+ View: typeof mainOl.View;
128
+ getUid: typeof mainOl.getUid;
129
+ VERSION: string;
130
+ };
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- import "../assets/main.scss";
3
- import { MapProps, NeshanMapRef } from "./Map.model";
4
- export declare const NeshanMap: import("react").ForwardRefExoticComponent<MapProps & import("react").RefAttributes<NeshanMapRef>>;
5
- export declare const NeshanMapWrappedInContext: import("react").ForwardRefExoticComponent<MapProps & import("react").RefAttributes<NeshanMapRef>>;
1
+ /// <reference types="react" />
2
+ import "../assets/main.scss";
3
+ import { MapProps, NeshanMapRef } from "./Map.model";
4
+ export declare const NeshanMap: import("react").ForwardRefExoticComponent<MapProps & import("react").RefAttributes<NeshanMapRef>>;
5
+ export declare const NeshanMapWrappedInContext: import("react").ForwardRefExoticComponent<MapProps & import("react").RefAttributes<NeshanMapRef>>;
@@ -1,55 +1,55 @@
1
- import { Map } from "ol";
2
- import { MapOptions as MainMapOptions } from "ol/PluggableMap";
3
- import React from "react";
4
- import { Ol } from "@/assets/ol.model";
5
- export interface BaseMapOptions extends MainMapOptions {
6
- mapType?: MapType;
7
- poi?: boolean;
8
- traffic?: boolean;
9
- }
10
- interface MapOptionsWithKey extends BaseMapOptions {
11
- key: string;
12
- }
13
- type MapOptionsUnion = {
14
- options?: BaseMapOptions;
15
- mapKey: string;
16
- } | {
17
- options: MapOptionsWithKey;
18
- mapKey?: undefined;
19
- };
20
- export interface BaseMapProps {
21
- serviceKey?: string;
22
- zoom?: number;
23
- center?: CoordsObj;
24
- scale?: number;
25
- defaultType?: MapType;
26
- poi?: boolean;
27
- traffic?: boolean;
28
- onInit?: (ol: Ol, map: OlMap) => void;
29
- className?: React.HTMLAttributes<HTMLDivElement>["className"];
30
- style?: React.HtmlHTMLAttributes<HTMLDivElement>["style"];
31
- }
32
- export type MapProps = BaseMapProps & MapOptionsUnion;
33
- export interface NeshanMapRef {
34
- mapContainer: React.RefObject<HTMLDivElement>;
35
- ol?: Ol;
36
- map: OlMap | null;
37
- isInitiated: boolean;
38
- }
39
- export declare interface CoordsObj {
40
- latitude: number;
41
- longitude: number;
42
- }
43
- export declare class OlMap extends Map {
44
- constructor(options: MapOptionsWithKey);
45
- setMapType(value: MapType): void;
46
- switchPoiLayer(value: boolean): void;
47
- switchTrafficLayer(value: boolean): void;
48
- }
49
- export declare type MapType = "neshan" | "dreamy" | "dreamy-gold" | "standard-night" | "standard-day" | "osm-bright";
50
- export declare type ViewType = undefined | "desktop" | "mobile";
51
- export declare interface Tile {
52
- title: MapType;
53
- url: string;
54
- }
55
- export {};
1
+ import { Map } from "ol";
2
+ import { MapOptions as MainMapOptions } from "ol/PluggableMap";
3
+ import React from "react";
4
+ import { Ol } from "@/assets/ol.model";
5
+ export interface BaseMapOptions extends MainMapOptions {
6
+ mapType?: MapType;
7
+ poi?: boolean;
8
+ traffic?: boolean;
9
+ }
10
+ interface MapOptionsWithKey extends BaseMapOptions {
11
+ key: string;
12
+ }
13
+ type MapOptionsUnion = {
14
+ options?: BaseMapOptions;
15
+ mapKey: string;
16
+ } | {
17
+ options: MapOptionsWithKey;
18
+ mapKey?: undefined;
19
+ };
20
+ export interface BaseMapProps {
21
+ serviceKey?: string;
22
+ zoom?: number;
23
+ center?: CoordsObj;
24
+ scale?: number;
25
+ defaultType?: MapType;
26
+ poi?: boolean;
27
+ traffic?: boolean;
28
+ onInit?: (ol: Ol, map: OlMap) => void;
29
+ className?: React.HTMLAttributes<HTMLDivElement>["className"];
30
+ style?: React.HtmlHTMLAttributes<HTMLDivElement>["style"];
31
+ }
32
+ export type MapProps = BaseMapProps & MapOptionsUnion;
33
+ export interface NeshanMapRef {
34
+ mapContainer: React.RefObject<HTMLDivElement>;
35
+ ol?: Ol;
36
+ map: OlMap | null;
37
+ isInitiated: boolean;
38
+ }
39
+ export declare interface CoordsObj {
40
+ latitude: number;
41
+ longitude: number;
42
+ }
43
+ export declare class OlMap extends Map {
44
+ constructor(options: MapOptionsWithKey);
45
+ setMapType(value: MapType): void;
46
+ switchPoiLayer(value: boolean): void;
47
+ switchTrafficLayer(value: boolean): void;
48
+ }
49
+ export declare type MapType = "neshan" | "dreamy" | "dreamy-gold" | "standard-night" | "standard-day" | "osm-bright";
50
+ export declare type ViewType = undefined | "desktop" | "mobile";
51
+ export declare interface Tile {
52
+ title: MapType;
53
+ url: string;
54
+ }
55
+ export {};
@@ -1,3 +1,4 @@
1
- export { NeshanMapWrappedInContext as NeshanMap } from "./Map";
2
- export type { NeshanMapRef, OlMap } from "./Map.model";
3
- export type { Ol } from "@/assets/ol.model";
1
+ import { NeshanMapWrappedInContext } from "./Map";
2
+ export default NeshanMapWrappedInContext;
3
+ export type { NeshanMapRef, OlMap } from "./Map.model";
4
+ export type { Ol } from "@/assets/ol.model";
@@ -1 +1 @@
1
- import "./index.css";
1
+ import "./index.css";
@@ -1,47 +1,47 @@
1
- import { Tile } from "../components/Map.model";
2
- export declare const urls: {
3
- reverse: string;
4
- search: string;
5
- map: string;
6
- };
7
- export declare const markerUrls: {
8
- main: string;
9
- search: string;
10
- colorSvg: string;
11
- greySvg: string;
12
- preview256: string;
13
- searchPrev: string;
14
- };
15
- export declare const tiles: Tile[];
16
- export declare const breakpointsSegments: {
17
- xs: boolean;
18
- sm: boolean;
19
- md: boolean;
20
- lg: boolean;
21
- xl: boolean;
22
- };
23
- export declare const breakpointsSegmentsPixels: {
24
- xs: number;
25
- sm: number;
26
- md: number;
27
- lg: number;
28
- xl: number;
29
- };
30
- export declare const drawerConstants: {
31
- width: string;
32
- bottomSheetNormalHeight: string;
33
- bottomSheetloadingHeight: string;
34
- bottomSheetBorderRadius: string;
35
- };
36
- export declare const unsetMapDimnensions: {
37
- width: string;
38
- height: string;
39
- };
40
- export declare const zoomConstants: {
41
- initialZoom: number;
42
- maxZoom: number;
43
- };
44
- export declare const markersOffset: {
45
- high: number[];
46
- short: number[];
47
- };
1
+ import { Tile } from "../components/Map.model";
2
+ export declare const urls: {
3
+ reverse: string;
4
+ search: string;
5
+ map: string;
6
+ };
7
+ export declare const markerUrls: {
8
+ main: string;
9
+ search: string;
10
+ colorSvg: string;
11
+ greySvg: string;
12
+ preview256: string;
13
+ searchPrev: string;
14
+ };
15
+ export declare const tiles: Tile[];
16
+ export declare const breakpointsSegments: {
17
+ xs: boolean;
18
+ sm: boolean;
19
+ md: boolean;
20
+ lg: boolean;
21
+ xl: boolean;
22
+ };
23
+ export declare const breakpointsSegmentsPixels: {
24
+ xs: number;
25
+ sm: number;
26
+ md: number;
27
+ lg: number;
28
+ xl: number;
29
+ };
30
+ export declare const drawerConstants: {
31
+ width: string;
32
+ bottomSheetNormalHeight: string;
33
+ bottomSheetloadingHeight: string;
34
+ bottomSheetBorderRadius: string;
35
+ };
36
+ export declare const unsetMapDimnensions: {
37
+ width: string;
38
+ height: string;
39
+ };
40
+ export declare const zoomConstants: {
41
+ initialZoom: number;
42
+ maxZoom: number;
43
+ };
44
+ export declare const markersOffset: {
45
+ high: number[];
46
+ short: number[];
47
+ };
@@ -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;