Merge pull request #241 from matzepan/feature/center-track
Feature/Center the map to the track when hovering on it
This commit is contained in:
commit
cb8aeee6ea
1 changed files with 1 additions and 0 deletions
|
|
@ -196,6 +196,7 @@ BR.TrackMessages = L.Class.extend({
|
|||
edgeLatLngs = trackLatLngs.slice(startIndex, endIndex + 1);
|
||||
|
||||
this._selectedEdge = L.polyline(edgeLatLngs, this.options.edgeStyle).addTo(this._map);
|
||||
this._map.panTo(this._selectedEdge.getBounds().getCenter());
|
||||
},
|
||||
|
||||
_handleHoverOut: function(evt) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue