mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-26 03:26:41 +07:00
changing distance on all events
This commit is contained in:
parent
5d02cd7c67
commit
28c51666a0
3 changed files with 113 additions and 24 deletions
|
@ -1,4 +1,4 @@
|
|||
import { Map, LayerGroup, Polyline } from 'leaflet';
|
||||
import { Map, LayerGroup, Polyline, LatLng } from 'leaflet';
|
||||
import { EditablePolyline } from '$utils/EditablePolyline';
|
||||
import { simplify } from '$utils/simplify';
|
||||
import { findDistance, getPolyLength, middleCoord } from '$utils/geom';
|
||||
|
@ -173,9 +173,9 @@ export class Poly {
|
|||
|
||||
clearArrows = (): LayerGroup<any> => this.arrows.clearLayers();
|
||||
|
||||
dumpData = (): Array<ILatLng> => this.latlngs;
|
||||
dumpData = (): Array<LatLng> => this.latlngs;
|
||||
|
||||
get latlngs(): Array<ILatLng> {
|
||||
get latlngs(): Array<LatLng> {
|
||||
return (
|
||||
this.poly && this.poly.getLatLngs().length
|
||||
&& this.poly.getLatLngs().map(el => ({ ...el }))) || [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue