[StyleCluster] -Autocompletado del limite superior del rango maximo
Test mapea4-sigc
by SIGC
HTML
<link rel="stylesheet" href="https://sigc.desarrollo.guadaltel.es/mapea42_dev/assets/css/mapea.ol.min.css">
<script src="https://sigc.desarrollo.guadaltel.es/mapea42_dev/vendor/browser-polyfill.js"></script>
<script src="https://mapea4-sigc.juntadeandalucia.es/mapea/js/mapea.ol.min.js"></script>
<script src="https://mapea4-sigc.juntadeandalucia.es/mapea/js/configuration.js"></script>
<link rel="stylesheet" href="https://mapea4-sigc.juntadeandalucia.es/mapea/assets/css/mapea.ol.min.css">
<div id="mapjs">
</div>
CSS
html,
body {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
}
JavaScript
let map = M.map({
container: 'mapjs',
layers: ["OSM"],
projection: "EPSG:4326*d"
});
let ayuntamientos = new M.layer.WFS({
name: "assda_sv10_ayuntamiento_point_indicadores",
url: "https://clientes.guadaltel.es/desarrollo/geossigc/wfs?",
namespace: "mapea",
name: "assda_sv10_ayuntamiento_point_indicadores",
legend: "Prestaciones - Ámbito municipal",
getfeatureinfo: "plain",
geometry: 'POINT',
});
map.addLayers(ayuntamientos);
let style = new M.style.Cluster({
ranges: [
{
min: 2,
max: 5,
style: new M.style.Point({
fill: {
color: 'red'
},
radius: 20
})
},
{
min: 20,
max: 2239,
style: new M.style.Point({
fill: {
color: 'yellow'
},
radius: 20
})
},
{
min: 6,
max: 19,
style: new M.style.Point({
fill: {
color: 'blue'
},
radius: 20
})
},
]
})
ayuntamientos.setStyle(style);