hgoebl / leaflet.multioptionspolyline Goto Github PK
View Code? Open in Web Editor NEWA Leaflet plugin for multi-colored polyline
Home Page: http://hgoebl.github.io/Leaflet.MultiOptionsPolyline/
License: MIT License
A Leaflet plugin for multi-colored polyline
Home Page: http://hgoebl.github.io/Leaflet.MultiOptionsPolyline/
License: MIT License
Thanks for the plugin!
Can you give me any suggestions how to pop open some information about the point when I click a point on a line, or some hover over information? Thanks!
Shouldn't you do
this.addLayer(new L.Polyline(segmentLatlngs, multiOptions.options[prevOptionIdx]));
instead of
this.addLayer(new L.Polyline(segmentLatlngs, multiOptions.options[optionIdx]));
?
What if I already have a color value in the array? So I don't need it to be calculated in the optionIdxFn
How to use color val from array without optionIdxFn and options?
Thanks
multiOptions: {
optionIdxFn: function(latLng) {
return color;
},
options: [{
color: 'gray'
}, {
color: 'green'
}, {
color: 'yellow'
}, {
color: 'red'
}]
},
Theoretically it is not an issue, but I'm using Angular2 and I was very interested in using in my project, it's very easy to use. But I can not use with typescript in my code, I try to put MultiOptionsPolyline in Leaflet Typings but not working =/
Some help how to use in Angular2?
Hello,
I have a multicolor polyline. Works as expected.
Now I would like to add a new point to my polyline.
I am trying to use syntax, like for regular polyine however this won't work:
polyline.addLatLng([lat, long]);
What is a proper syntax to do that?
Hi,
As I could not find the documentation for all the supported options. Does any one know whether we set the weight as meters instead of pixels in Leaflet L.polyline options?
Thanks a lot.
John.
Hi,
I saw that it is possible to include the speed for calculating the polyline and condition to control the color of the polyline. I'm wondering if it is possible to include like a custom option to put the date and time of that coordinate in the polyline? This may help to use when clicking the polyline and integrated with timedimension geojson layer to find the date and time of that route when it was happened.
If I initialize a multi-options polyline with a set of lat lng values and change it to a new array of values via setLatLngs the map will reflect the changes, but the result from getLatLngs() will be the original array. This seems like undesired behavior. I think you might have just forgotten to reset _originalLatlngs to the new array in setLatLngs. Yes?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.