Fix for a few errors when loading nogos with weight

* Nogo weight was not set when loading nogos with a default weight
value.
* The URL would show up "NaN" values upon reloading the web interface
after having loaded some nogos.

Fix #174.
This commit is contained in:
Phyks (Lucas Verney) 2019-05-09 08:48:59 +02:00
parent 5f89287a97
commit c58818e50b
2 changed files with 9 additions and 8 deletions

View file

@ -415,9 +415,7 @@
var geoJSON = L.geoJson(turf.featureCollection(cleanedGeoJSONFeatures), {
onEachFeature: function (feature, layer) {
if (!feature.properties.nogoWeight) {
feature.properties.nogoWeight = nogoWeight;
}
layer.options.nogoWeight = feature.properties.nogoWeight || nogoWeight;
}
});
var nogosPoints = geoJSON.getLayers().filter(function (e) {