var m = M.map({
"controls": ["layerswitcher", "panzoom", "navtoolbar","mouse"],
"wmcfiles": ["callejero"],
"container": "map",
"layers": [
"WFST*CapaWFS2*http://clientes.guadaltel.es/desarrollo/geossigc/callejero/wms?*callejero:prueba_pol_wfst*MPOLYGON",
"WFST*CapaWFS2*http://clientes.guadaltel.es/desarrollo/geossigc/cfv/wms?*cfv:da02_term_munic*MPOLYGON",
"KML*Arboleda*http://mapea-sigc.juntadeandalucia.es/Componente/kml/*arbda_sing_se.kml*true"
]
}).addPlugin(new M.plugin.AttributeTable());
m.addPlugin(new M.plugin.Printer({
"params": {
"pages": {
"clientLogo": "http://www.juntadeandalucia.es/economiayhacienda/images/plantilla/logo_cabecera.gif",
"creditos": "Impresión generada a través de Mapea"
},
"layout": {
"outputFilename": "mapea_${yyyy-MM-dd_hhmmss}"
}
}
}, {
"options": {
"legend": "true"
}
}));
var prueba_pol_wfst = m.getWFS()[0];
var municipios = m.getWFS()[1];
var layerKML = m.getKML()[0];
//INTERSECT LAYER-LAYER - Municipios en los que hay puntos KML
function filterMunicipiosKML() {
let filtro = M.filter.spatial.INTERSECT(layerKML);
municipios.setFilter(filtro);
}
//INTERSECT LAYER-LAYER - Puntos KML en los que hay polígonos de la capa de polígonos
function filterKMLMunicipios() {
let filtro = M.filter.spatial.INTERSECT(prueba_pol_wfst);
layerKML.setFilter(filtro);
}
// //INTERSECT CON FILTRO AND
// Filtra aquellos municipios que intersequen con la capa de puntos y esten
// en la provincia de Huelva
function filterInstersectAndAttribute() {
let filtro = M.filter.spatial.INTERSECT(prueba_pol_wfst);
let filtro2 = new M.filter.Function(
function(feature) {
return feature.getAttribute("provincia") === "Huelva";
});
let and = M.filter.AND([filtro, filtro2]);
municipios.setFilter(and)
}
// //FILTRO EQUAL CON INTERSECT
// Filtra aquellos municipios que intersequen con la capa de polígonos ó
// cuyo codigo de municipio sea...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.