Comments (9)
@ToHold - the author of this plugin obviously abandoned it. Which is why I find it interesting that Leaflet still keeps it on their site even though it's completely broken with the new leaflet.
However, not to fear a colleague of mine and myself have been working the last several days getting it migrated over to leaflet 1.5.x ..
We have a prelim version working. Once we're done we will fork this repo and create our own. to Provide a working copy of this (with more documentation!!! and more functionality).
from l.control.linestringselect.
@ToHold fixed
@xmikedanielsx migrating it to [email protected] was about 20 minutes. I never had much push for that, and I somehow missed this ticket (I have a lot of public repositories). Please refrain from bitter messages like that, instead you can always fork the repo and make a PR.
Excited to see the new functionality you were working on!
from l.control.linestringselect.
from l.control.linestringselect.
@w8r -- please understand my comment was not meant in any means to be "bitter". I was really impressed with this plugin and truly do love the work you did. So much I recommended it for my work. I have been butchering it unfortunately in my code because I do not understand quite how to use it (from a source stand point). However I am pushing myself through it. Code is clean :) Until I got a hold of it. haha
Things I needed I have managed to butcher together
- wrap for use with vuejs
- ability to change markers from circle markers to icons
- ability to load previous selections back to the plugin on initialization. (1/2 way) first load back works second fails due to it going from a function to a normal array
Things I would love to have
- a little bit better documentation (if these things are already capable of being done)
- ability to pass styles to plugin (Marker or CircleMarker) styles for the specified type of marker (since you're extending the marker anyways I was hoping to be able to do this)
- Maybe adding a little bit of api as well. So we can hook on at least enabled, after first selection, after second selection, selections completed, finished resetting, disabled
Thank you again so much for your amazing work and contribution :)
from l.control.linestringselect.
@xmikedanielsx
to extend it with your own type of markers, you need to extend the control and replace the following methods on it, that's the easiest way:
/**
* Replace this method if you want to subclass moving marker
* @param {L.LatLng} pos
* @param {Object} style
* @return {L.Control.LineStringSelect.ControlMarker}
*/
movingMarkerFactory: function(pos, style) {
return new ControlMarker(pos, style);
},
/**
* Replace this method if you want to subclass endpoint marker
* @param {L.LatLng} pos
* @param {Object} style
* @param {Boolean} isEnd
* @return {L.Control.LineStringSelect.Endpoint}
*/
endpointFactory: function(pos, style, isEnd) {
return new Endpoint(pos, style);
},
styles for those are passed via control options, so that's quite straight-forward, too
from l.control.linestringselect.
@w8r
Yeah, I followed that. I have done it. However I am doing it from the dist file as I do not quite follow the build process for this repo. If there is some other location I should be looking to be able to change and see changes let me know. But my thought process was that I would update files. while watching and it would create new bundles and I would use that in order to see changes in my system. But it doesn't seem to do that. Maybe I am using it wrong. Maybe you can quickly document if you wouldn't mind the process to build this. as I am very interested in adding functionality to this :) I wrote you PM as well on GMAIL. Thanks for understanding I was not trying to be bitter :)
from l.control.linestringselect.
around here you can find how to get the meter marks of selection start and end
https://github.com/w8r/L.Control.LineStringSelect/blob/master/examples/js/app.js#L47
you can then store these values and use selectMeters
on initialize to restore previous selection
from l.control.linestringselect.
as for Vue.js - I don't really know that framework, I can't help you there
from l.control.linestringselect.
it's not really about vuejs -- this I know how to use very well.
It's about your repo. So I cloned it. npm i . Then npm start
But.. the example uses bundle.js
So everything in src doesn't really do anything from what I understand. Because as I see no where in your package.json file does it mention any of your src files.. this is what I am missing? Should I completely ignore the src files?
from l.control.linestringselect.
Related Issues (9)
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 l.control.linestringselect.