Center the map to the track when hovering on it

This commit is contained in:
Unknown 2019-09-27 10:50:26 +02:00
parent 029bdad4ff
commit e21bf246ee

View file

@ -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) {