added gpx dialog

This commit is contained in:
Fedor Katurov 2020-01-24 16:53:47 +07:00
parent 947ec69e60
commit e995b46641
33 changed files with 11687 additions and 131 deletions

View file

@ -1,7 +1,7 @@
import { Map, LineUtil } from 'leaflet';
import { ILatLng } from "~/redux/map/types";
import { Map, LineUtil, LatLng } from 'leaflet';
// import { ILatLng } from "~/redux/map/types";
export const simplify = ({ map, latlngs }: { map: Map, latlngs: ILatLng[] }): ILatLng[] => {
export const simplify = ({ map, latlngs }: { map: Map, latlngs: LatLng[] }): LatLng[] => {
const zoom = 12;
const mul = 0.7; // 0 - not simplifying, 1 - very rude.
const points = latlngs.map(({ lat, lng }) => map.project({ lat, lng }, zoom));