Closed JulioV closed 10 years ago
I'm using the LeafletPlaybackWithDeps.js file in the dist folder of the master.I tried to add a new track programmatically using the addTracks function but it fails in the line:
https://github.com/hallahan/LeafletPlayback/blob/master/src/Tick.js#L23
because the map reference is wrong( in my case it points to the map div instead the Leaflet map class).
So what I did was:
1.- Add the line "this.map = map" after line https://github.com/hallahan/LeafletPlayback/blob/master/src/Tick.js#L5 (in the initialization function of L.Playback.Tick.)
2.- Change the reference of "map" to "this.map" in line https://github.com/hallahan/LeafletPlayback/blob/master/src/Tick.js#L23
Now it works fine, so is ok if I update the code in the repository?
Makes sense. I will merge your pull request. Sorry for responding so late. I guess you email slipped through my inbox...
Done lbutler@55d35f6
I'm using the LeafletPlaybackWithDeps.js file in the dist folder of the master.I tried to add a new track programmatically using the addTracks function but it fails in the line:
https://github.com/hallahan/LeafletPlayback/blob/master/src/Tick.js#L23
because the map reference is wrong( in my case it points to the map div instead the Leaflet map class).
So what I did was:
1.- Add the line "this.map = map" after line https://github.com/hallahan/LeafletPlayback/blob/master/src/Tick.js#L5 (in the initialization function of L.Playback.Tick.)
2.- Change the reference of "map" to "this.map" in line https://github.com/hallahan/LeafletPlayback/blob/master/src/Tick.js#L23
Now it works fine, so is ok if I update the code in the repository?