Closed waldner closed 3 years ago
The way I would solve it : create your own popup using L.popup
and move/update it on timeloading.
The way I would solve it : create your own popup using
L.popup
and move/update it on timeloading.
Unfortunately, for moderate to high frame rate that is virtually unusable due to flickering. Furthermore, I'd like the popup to stay open even when the user pauses the playback.
I did not test but i'm guessing that if you add your own popup without binding it to a marker. You can then move it opened.
var popup = L.popup()
.setLatLng(lastpointCoordinates)
.setContent('<p>Hello world!<br />This is a nice popup.</p>')
.openOn(map);
On timedimension changes, find the last point and update the position using popup.setLatLng
.
I'm sorry if it's already what you've done. I will have to test this.
Ah, that's a nice idea. I'll check it tomorrow and let you know. Thanks!
if you add your own popup without binding it to a marker. You can then move it opened.
This needed a few adjustments but set me on the right track. It works very well. Thanks!
I'm using GeoJSON with
addLastPoint: true
which creates a marker on the last point. I'd like to bind a popup to this marker (done inpointToLayer
), immediately open the popup (not been able to do), and, more importantly, keep the popup open even during playback (ie, after clicking "play" on the player control). Is this possible at all? Would you accept it as feature request?EDIT: Reading through the bugs, I found the
timeloading
event mentioned. Listening on that event and (re)opening the popup at each invocation produces flickering and is not a viable solution.