@neshan-maps-platform/react-openlayers
Version:
A react map component wrapping neshan openlayers map.
31 lines (30 loc) • 899 B
TypeScript
import { Coordinate } from "@neshan-maps-platform/ol/coordinate";
import { CoordsObj } from "../components/Map.model";
/**
* Get the object of location and turns it into array
* @param loc - location object
* @returns
*/
export declare const sanitizeLocation: (loc?: CoordsObj) => Coordinate | undefined;
/**
* Gets the device location
* if it was succesfull, formats it and returns
* otherwise, sends Neshan locaton
* @returns location array
*/
export declare const getLocation: () => Promise<Coordinate>;
/**
* Create an object for a quick lat lng access
*/
export declare const createCoordsObject: () => {
longitude: number;
latitude: number;
};
/**
* Transforms common latlng to open layers-friendly latlng
* @param point
* @param from
* @param to
* @returns points
*/
export declare const transformCoords: (point: Coordinate, from?: string, to?: string) => Coordinate;