CP-999-01
Consumo recursos - PUNTOS
by SIGC
HTML
<script src="https://sigc.desarrollo.guadaltel.es/mapea5/js/mapea.ol.min.js"></script>
<link rel="stylesheet" href="https://sigc.desarrollo.guadaltel.es/mapea5/assets/css/mapea.ol.min.css">
<script src="https://sigc.desarrollo.guadaltel.es/mapea5/js/configuration.js"></script>
<div id="cluster" class="container">
<button type="button" onclick="cluster()">cluster</button>
<button type="button" onclick="desX()">deshacer</button>
</div>
<div id="cloropleth" class="container">
<button type="button" onclick="choropleth()">choropleth</button>
<button type="button" onclick="desX()">deshacer</button>
</div>
<div id="categoryStyle" class="container">
<button type="button" onclick="categoryStyle()">categoryStyle</button>
<button type="button" onclick="desX()">deshacer</button>
</div>
<div id="Proportional" class="container">
<button type="button" onclick="Proportional()">Proportional</button>
<button type="button" onclick="desX()">deshacer</button>
</div>
<div id="estadistica" class="container">
<button type="button" onclick="estadistica()">estadistica</button>
<button type="button" onclick="desX()">deshacer</button>
</div>
<div id="map"></div>
CSS
<style rel="stylesheet">
html,
body {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
}
JavaScript
var mapajs = M.map({
'container': 'map',
"controls": ["layerswitcher", "mouse", "scale", "overviewmap", "panzoombar", "scaleline"],
"getfeatureinfo": "plain"
});
var centros = new M.layer.WFS({
name: "Centros ASSDA",
url: "https://clientes.guadaltel.es/desarrollo/geossigc/wfs?",
namespace: "mapea",
name: "centrosassda",
legend: "centrosassda",
geometry: 'POINT',
});
mapajs.addLayers(centros);
centros.on(M.evt.LOAD, () => alert('centros cargados'));
//
// ///////////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////////////
//
//cloroplethPOINT
let stylesPoint = [
new M.style.Point({
fill: {
color: '#FF0099'
},
radius: 6
}),
new M.style.Point({
fill: {
color: '#00AAAA'
},
radius: 7
})
];
let choroplethp = new M.style.Choropleth("nregin", stylesPoint, M.style.quantification.JENKS()); //M.style.quantification.JENKS() --> f(d, l = 6) --> f(d, 2)
function choropleth() {
let tiempo_ini = calculafecha();
centros.setStyle(choroplethp);
let tiempo_fin = calculafecha();
calculadif(tiempo_ini, tiempo_fin);
}
// ///////////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////////////
//...