Style Cluster

by SIGC

HTML

<link rel="stylesheet" href="https://mapea4-sigc.juntadeandalucia.es/assets/css/mapea.ol.min.css">
<script src="https://mapea4-sigc.juntadeandalucia.es/js/mapea.ol.min.js"></script>
<script src="https://mapea4-sigc.juntadeandalucia.es/js/configuration.js"></script>
<div id="map">
</div>

CSS

html,
 body {
   margin: 0;
   padding: 0;
   height: 100%;
   overflow: hidden;
 }

JavaScript

var map = M.map({
      'container': 'map',
      "controls": ["layerswitcher"],
      layers: ["OSM"]
    });


    let centros = new M.layer.WFS({
      name: "Centros ASSDA",
      url: "https://clientes.guadaltel.es/desarrollo/geossigc/wfs?",
      namespace: "mapea",
      name: "centrosassda",
      getfeatureinfo: "plain",
      geometry: 'POINT',
    });
    map.addLayers(centros);
    
    var stp = new M.style.Point({
    	fill:{ color:'red'},
      radius: 15
    });
   //  centros.setStyle(stp);
    let style = new M.style.Cluster();
    style.add(stp);
   centros.setStyle(style);