Adding Colonias Penitenciarias

Adding the layer "colonias penitenciarias" to the leaflet map, updating the geojson file with the data
This commit is contained in:
Marco Rizzetto 2017-06-19 22:07:32 +02:00
parent 169203f4c1
commit 84bc6a3895
2 changed files with 24 additions and 9 deletions

View file

@ -191,6 +191,21 @@
layer.addTo(mymap);
}
}
// Colonias Penitencia
if (layer.feature && layer.feature.properties && layer.feature.properties.ANYO_INI) {
var ini = parseInt(layer.feature.properties.ANYO_INI);
var fin = parseInt(layer.feature.properties.ANYO_FIN);
if (ini < ui.value && fin > ui.value) {
layer.options.fillOpacity = .8;
layer.remove();
layer.addTo(mymap);
}
else {
layer.options.fillOpacity = 0;
layer.remove();
layer.addTo(mymap);
}
}
});
}
});