render: poly drawing

This commit is contained in:
muerwre 2018-11-28 10:58:44 +07:00
parent 6ed0361acf
commit fb087c67ac
7 changed files with 76 additions and 13 deletions

View file

@ -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';

View file

@ -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)');