Comments (6)
I would look at some GPX plugins and see if they support playback, then write some stuff to make sure that the marker always is located at/between the right coordinates.
What format is your GPS data in GPX? GeoJSON?
Is you using a (Live)API?
Edit:
Another solution would be to split the path. Location 1/2 loads first and at the end of the line the marker disappears. Then a new path between location 2/3 loads, at the end of the line the marker disappears and the location 3/4 loads and so on...
from leaflet.animatedmarker.
hi,
I am feeding GPS data (lat,lon) to the leaflet js. I was trying to get the marker to move as and when the co-ordinates change. I have a javascript timer which looks for updated gps co-ordinates and if there is a change in the older and current values, then it needs to move the marker to the new location / co-ordinates. "setLatLng" might be a way but perhaps it would have the smooth animation that animatedmarker has/does ".)
Cheers,
M&M
On Sunday, June 22, 2014 8:43 PM, Albin Larsson [email protected] wrote:
Add coordinates to the array with AJAX? I'm not 100 sure that it will work at all. I think that the marker will restart each time...
I would look at some GPX plugins and see if they support playback, then write some stuff to make sure that the marker always is located at/between the right coordinates.
What format is your GPS data in GPX? GeoJSON?
Is you using a (Live)API?
—
Reply to this email directly or view it on GitHub.
from leaflet.animatedmarker.
hi,
Thanks for the suggestion. I did think about adding the polyline in parts...like a-b,b-c,c-d then based on location use the start/stop method. Somehow it didn't seem elegant so I hesitated. I think I'll give that a try and see how it goes. ".)
from leaflet.animatedmarker.
It would have been just nice if the animated marker had some move, or moveTo method. So you can just start off with a certain co-ordinate...and then that changes you just call the animatedMarker.moveto(x,y) :-D
Cheers,
M&M
from leaflet.animatedmarker.
Leaflet supports adding points with AJAX(Bjørn Sandvik has been working with this solution).
What you could do is that when you adding a new point you drag a line from the last one to the new one. This would animate a line, but not a icon(that would work but look bad). This requires that you loads new coordinates very often...
from leaflet.animatedmarker.
Okie thanks Abbe for the pointer. I'll check it out
from leaflet.animatedmarker.
Related Issues (20)
- package.json
- Markers position bug when map zooming
- how can add latlngs to the polyline in interval when it start run HOT 1
- Adding to Bower's registry HOT 2
- Using animated marker with realtime GPS data HOT 3
- Add git tag HOT 2
- when "zoom ing", the marker slides to the correct position instead of snapping to it HOT 2
- Any plans on adding to npm? HOT 4
- Using with react-leaflet HOT 3
- restart animation
- stop() does not work for me.
- onEnd gets called twice HOT 1
- demo not working under https HOT 2
- feature request: pause and continue HOT 1
- The demo doesn't work because gh-pages branch is not up-to-date
- infinite loop
- Project Status and recommended fork?
- demo ko HOT 1
- move the popup label (animated) together with marker.
- Fix the demo! HOT 1
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 leaflet.animatedmarker.