hallahan / LeafletPlayback

This is a Leaflet plug-in that plays back points that have a time stamp synchronized to a clock.
http://leafletplayback.theoutpost.io
Other
482 stars 165 forks source link

LeafletPlayback not working with leaflet version > 1 #54

Open stiwari99 opened 7 years ago

stiwari99 commented 7 years ago

I am getting following error when trying to use leaflet playback with leaflet version 1.0.3

error: this.callInitHooks is not a function

I am getting this when I call var playback = L.Playback(map, demoTracks, null, {}); and it seems like error is coming from this piece of code

L.Map.addInitHook(function () {
    if (this.options.playback) {
        this.playback = new L.Playback(this);
    }
});
answerquest commented 6 years ago

On my end while it's working, when I click and drag the time slider, the map moves with it. So I'm sticking with 0.7.3 for now.

SFSailor commented 6 years ago

Odd. I am using Leaflet 1.2.0 and it's working "as advertised". Perhaps the latest release fixes your issue. The time slider problem does exist for me too, but I am assuming I can fix that either with some propagation blocking or by using one of the fancier sliders...

answerquest commented 6 years ago

@SFSailor pls share how you do the propagation blocking.. I haven't been able to figure that out.

SFSailor commented 6 years ago

I will do that. I had managed it for a custom control, but it seems not to be working yet on the slider. I notice that Weather Underground has the same problem.

answerquest commented 6 years ago

If this is abnormal behaviour then should we file an issue in Leaflet? In the past, you'd have to code for propagating clicks through the html element overlaid on the map. Now it's happening by default.

tfaulkner-eaglegroup commented 6 years ago

I'm getting this same problem on 1.3.1 now.