Skip to content

Proporcional

Javier edited this page Dec 12, 2017 · 12 revisions
let mapajs = M.map({
  container: "map",
  controls: ['layerswitcher', 'overviewmap'],
});

let layer = new M.layer.WFS({
  name: "Centros ASSDA - Subtipos",
  url: "https://clientes.guadaltel.es/desarrollo/geossigc/wfs?",
  namespace: "mapea",
  name: "centrosassda_subtipo",
  legend: "centrosassda_subtipo",
  geometry: 'POINT',
});

mapajs.addLayers(layer);

//definimos un estilo proporcional 
let styleProp = new M.style.Proportional('nregin', 5, 20, new M.style.Point({
  fill: {
    color: '#000000'
  },
  stroke: {
    color: '#FFFFFF',
    width: 2
  }
}));

//lo establecemos a la capa
layer.setStyle(styleProp);

Ejemplo funcional

Clone this wiki locally