Comments (5)
Hi, and thanks for using my lib.
Actually it was the next planned addition, it's really missing for now. I think I'll provide a method to explicitely update the coordinates used by a decorator, to be called after the line.setLatLngs.
Luckily I'll have time to do it in the next few days.
from leaflet.polylinedecorator.
Here it is. You can now call the setPaths method on a decorator, with the same type of arguments given to the constructor (polyline, raw coordinates, multi, etc.). It will take the new coordinates into account and redraw the patterns.
Please bear in mind that there is no optimization yet, so if you use an array of polylines as argument and only update one of them, it will redraw everything.
Hope it will be useful to you.
from leaflet.polylinedecorator.
Thanks for the speedy fix. It works. Just one thing I noticed: you have to add a decorator to the map before calling setPaths(). Else you get an exception that _map is undefined. Might be good to support that case as well.
from leaflet.polylinedecorator.
Thanks for finding this bug. I've opened a dedicated issue: #14
from leaflet.polylinedecorator.
Is it possible to bind the polyline position to the arrow position too?
from leaflet.polylinedecorator.
Related Issues (20)
- How in leaflet add custom data to polyline?
- I'd like to ask you how to add slashes to polygons, like this
- how do i delete some arrow on the map HOT 1
- Separate colors for stroke, fill HOT 1
- Markers Color HOT 9
- Leaflet polyline decorator HOT 1
- Decorator onclick event retrieve property HOT 1
- How to disable arrow auto scale? HOT 2
- Using polylineDecorator with ant-path is not working HOT 1
- Show/Hide Polylinedecorators dynamically (based on other variable) in React Leaflet
- Is there any option to prevent collision between arrows?
- How to add multiple arrows in one line๏ผ HOT 2
- Further development HOT 2
- How can I make polylineDecorator not interactive ? HOT 1
- rotationAngle conflicts with Leaflet.RotatedMarker HOT 4
- L.polylineDecorator is Undefined HOT 2
- PolylineDecorator always top layer even when calling bringToBack() HOT 3
- Polyline decorator doesn't preserve the state of symbol styling HOT 1
- Problem with fullscreen control
- Problem with using method setPaths
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leaflet.polylinedecorator.