Closed Patabugen closed 2 years ago
Hello there.
I may need to think about it for a bit. It's not straight forward for now.
Hello, I have an interest in this.
Do you have any idea on how to do it?
For the moment what I am doing is to create an interval to read the last 2 coordinates os the polyline (the previous coordinate and the new added cordinate), and inside this interval I have the var lastLine = L.motion.polyline(...)
.
I works, but the problem is that the interval keeps drawing the same coordinates until I have a new coordinate.
Also, I was looking to hide the marker and I couldnt, I thought it was the "showMarker" option that controls that feature.
I've not worked on this since, but hopefully will be in the next month or two so will let you know if I manage anything.
The objects are just JavaScript objects - could you add a property to them to record whether you've drawn the or not and skip the interval if so?
I'd be interested to see your code if it's somewhere you can share it.
Hello guys,
Have you tried to use Seq object? Create a seq with a initial line (when creating a line you surelly know start point and end point) And then just add to the seq new\next lines.
No, but it seems very usefull, it is a library? I will investigate about it. Thanks!
@Patabugen here is the section of my code where I tried to use motion with realtime feature, but I get a problem with the zoom.
https://github.com/luquezsantiago86/motion_rt/
Let me know if you if I can help you with something, and if you have any idea about this.
Hello guys,
Have you tried to use Seq object? Create a seq with a initial line (when creating a line you surelly know start point and end point) And then just add to the seq new\next lines.
Hi @Igor-Vladyka sorry to bother you. I came back to investigate this again. Do you have more information of what you said about "Seq objet"? I was look on the web but I am quite new in JS and couldnt find out what you tried to said.
Any information or example would be great, Thanks!
Hello.
What I mean is
L.motion.seq([], options).addTo(map);
it's a build in structure in current library to support sequential animation objects.
@Igor-Vladyka Thanks so much! I will give it a try!
Hey Both,
Thanks for the tip to look at seq
@Igor-Vladyka ! I've had some success making addLayer work
Here's a pull request:
https://github.com/Igor-Vladyka/leaflet.motion/pull/25
@luquezsantiago86 not sure how familiar you are with package.json
but if it saves you some time you can test out my version of the package just by changing your version string in package.json
to mill-hill-automation/leaflet.motion#develop
and running npm update
.
Don't stay on my #develop branch for too long though, I may well break it :)
For example:
"dependencies": {
"leaflet.motion": "mill-hill-automation/leaflet.motion#develop",
}
Hey guys, I'm back.
Let me check what the hell, fix will be released in next major version soon.
Welcome back @Igor-Vladyka! I'll have a look at your other comments when I'm working on that project work over the next few weeks, excited to have your input again :)
Hey guys. Currently it's implemented in latest version. Please check out documentation and example here, created by @Patabugen
I'm displaying routes that someone has traveled, your (superb) plugin lets me draw the line in a more natural way.
However I also want to display routes in real-time, which means loading the saved route and drawing it with leaflet.motion, but then adding to the length one or two waypoints at a time.
Do you have any suggestions for how I can add to an existing line (which may still be in motion, or may have finished?).
I've been experimenting with the addLatlng but don't think that's the right thing to do. I've also pondered using your Group feature and adding a new motionLine each time - but will be adding hundreds of mini lines that way and thought I'd see if there was a way to add one at a time?