mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
render: poly drawing
This commit is contained in:
parent
6ed0361acf
commit
fb087c67ac
7 changed files with 76 additions and 13 deletions
|
@ -1,4 +1,6 @@
|
|||
import { map, tileLayer } from 'leaflet';
|
||||
// import { Map as map } from 'leaflet/src/map/Map';
|
||||
// import { TileLayer as tileLayer } from 'leaflet/src/layer/tile/TileLayer';
|
||||
|
||||
import 'leaflet/dist/leaflet.css';
|
||||
import 'leaflet-editable';
|
||||
|
|
|
@ -2,6 +2,7 @@ import L from 'leaflet';
|
|||
import 'leaflet-geometryutil';
|
||||
import { simplify } from '$utils/simplify';
|
||||
import { findDistance, middleCoord } from '$utils/geom';
|
||||
import { CONFIG } from '$config';
|
||||
|
||||
const polyStyle = {
|
||||
color: 'url(#activePathGradient)',
|
||||
|
@ -49,7 +50,7 @@ export class Poly {
|
|||
latlngs[i - 1],
|
||||
[mid.lat, mid.lng]
|
||||
],
|
||||
{ color: 'none', weight: '5' }
|
||||
{ color: 'none', weight: CONFIG.STROKE_WIDTH }
|
||||
).addTo(this.arrows);
|
||||
|
||||
slide._path.setAttribute('marker-end', 'url(#long-arrow)');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue