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