Giter Site home page Giter Site logo

leaflet-spline's People

Contributors

slutske22 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jayli3n

leaflet-spline's Issues

Leaflet 1.9 compatibility

Hello! I'm trying to install this plugin in Leaflet 1.9 but is only compatible with 1.7.1?

"leaflet": "1.7.1",

npm install leaflet-spline --save

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: undefined@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/leaflet
npm ERR!   dev leaflet@"^1.9.3" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer leaflet@"1.7.1" from [email protected]
npm ERR! node_modules/leaflet-spline
npm ERR!   leaflet-spline@"*" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/lito/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/lito/.npm/_logs/2023-01-05T08_51_29_990Z-debug-0.log

Thanks!

Allow set an empty path on constructor

The plugin constructor requires that path on start, but on my usage (for example) I'm starting with an empty Polyline and filled with points on advanced point after. Then, the plugin fails:

setPolyline() {
    this.line = L.spline([], {
        weight: 5,
        opacity: 1,
        smoothFactor: 1
    }).addTo(this.layer);

    return this;
}

setLinePoints(points) {
    this.line.setLatLngs(points);

    return this;
}
index.js:95 Uncaught TypeError: Cannot read properties of undefined (reading 'lat')
    at Spline._transformPoints (index.js:95:26)
    at new Spline (index.js:84:15)
    at Object.spline (index.js:338:12)

Integrating with older site

I'm trying to integrate this into an older site that doesn't use node, is it possible to host the javascript on a CDN somewhere where I can just import it using a <script> tag?

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.