mirror of
https://github.com/medialab-prado/poblados-colonizacion-colonias-penitenciarias.git
synced 2025-06-08 06:21:28 +02:00
Adding Colonias Penitenciarias
Adding the layer "colonias penitenciarias" to the leaflet map, updating the geojson file with the data
This commit is contained in:
parent
169203f4c1
commit
84bc6a3895
2 changed files with 24 additions and 9 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue