[Test] GeoJSON rendermode
by Francisco
HTML
<script src="http://mapea4-sigc.juntadeandalucia.es/js/mapea-5.0.0.ol.min.js"></script>
<link rel="stylesheet" href="http://mapea4-sigc.juntadeandalucia.es/assets/css/mapea-5.0.0.ol.min.css">
<script src="http://mapea4-sigc.juntadeandalucia.es/js/configuration-5.0.0.js"></script>
<div id="map"></div>
CSS
html,
body,
#map {
padding: 0;
margin: 0;
width: 100%;
height: 100%;
}
JavaScript
var mapajs = M.map({
container: "map",
wmcfiles: ["callejero"]
});
let ly = new M.layer.GeoJSON({
name: "Provincias",
url: "http://www.ieca.junta-andalucia.es/geoserver-ieca/topp/wfs?service=WFS&request=GetFeature&version=1.1.0&typename=topp:secc_2014_01&srsname=EPSG:25830&outputformat=application/json"
}, {}, {
//renderMode: "image"
});
/*let categoryStylep = new M.style.Category('COD_MUN');
ly.setStyle(categoryStylep);
ly.on(M.evt.SELECT_FEATURES, function(features) {
console.log("Se han seleccionado los features: ", features);
features[0].setStyle(new M.style.Polygon({
fill: {
color: 'pink',
opacity: 0.5,
},
stroke: {
color: '#FF0000',
width: 2
}
}));
});*/
//GeoJSON servido
mapajs.addLayers(ly);