Skip to content

Commit

Permalink
Fix path layers not displayed at creation
Browse files Browse the repository at this point in the history
  • Loading branch information
justinefricou authored and submarcos committed Sep 4, 2024
1 parent 58924cd commit 7e9c1eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion geotrek/core/static/core/multipath.js
Original file line number Diff line number Diff line change
Expand Up @@ -917,12 +917,12 @@ L.Handler.MultiPath = L.Handler.extend({
})
oldStepsIndexes = data.oldStepsIndexes
newStepsIndexes = data.newStepsIndexes
var previousRouteLayer = this._routeLayer.getLayers()

if (!this._routeLayer) {
this._routeLayer = L.featureGroup()
this.map.addLayer(this._routeLayer);
}
var previousRouteLayer = this._routeLayer.getLayers()
this.updateRouteLayers(data.geojson.geometries, oldStepsIndexes, newStepsIndexes)

var isNewMarkerBeingCorrected = this._routeIsValid == false && this._previousStepsNb > previousRouteLayer.length + 1
Expand Down

0 comments on commit 7e9c1eb

Please sign in to comment.