slutske22 / leaflet-spline Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hello! I'm trying to install this plugin in Leaflet 1.9 but is only compatible with 1.7.1?
Line 24 in 5e7d64f
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!
Maybe is a Leaflet related issue, but... can be used this plugin toghether other plugins, like https://github.com/Oliv/leaflet-polycolor
Something as:
const line = L.polycolor([], options)
.spline()
.addTo(layer);
Thanks!
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)
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?
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.