GithubHelp home page GithubHelp logo

hgoebl / leaflet.multioptionspolyline Goto Github PK

View Code? Open in Web Editor NEW
100.0 100.0 34.0 89 KB

A Leaflet plugin for multi-colored polyline

Home Page: http://hgoebl.github.io/Leaflet.MultiOptionsPolyline/

License: MIT License

JavaScript 71.32% HTML 28.68%

leaflet.multioptionspolyline's People

Contributors

hgoebl avatar lhaferkamp avatar mjanda avatar sashee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

leaflet.multioptionspolyline's Issues

Pop up point data on click?

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!

Using wrong options?

Shouldn't you do

this.addLayer(new L.Polyline(segmentLatlngs, multiOptions.options[prevOptionIdx]));

instead of

this.addLayer(new L.Polyline(segmentLatlngs, multiOptions.options[optionIdx]));

?

If I already have a color value in the array?

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'
                }]
            },

Angular2 Typescript version?

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?

Append new point to polylne

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?

Add DateTime as polyline options

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.

Calling setLatLngs() with a new path doesn't change the value returned by getLatLngs()

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.