[OD] StyleManager - Plugin de control de simbologia
[OD] StyleManager - Plugin de control de simbologia
by deivil79
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>
<link rel="stylesheet" href="http://mapea4-sigc.juntadeandalucia.es/plugins/stylemanager/stylemanager.min.css">
<script src="http://mapea4-sigc.juntadeandalucia.es/plugins/stylemanager/stylemanager.ol.min.js"></script>
<div id="mapjs">
</div>
CSS
html,
body {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
}
JavaScript
var myMap = M.map({
container: 'mapjs',
controls: ['layerswitcher']
});
// create here the plugin
var mp = new M.plugin.StyleManager();
//var mp2 = new M.plugin.AttributeTable();
let paisajes = new M.layer.GeoJSON(
{name: "Paisaje",
url: "http://www.iaph.es/ide/paisaje/wfs?service=WFS&version=1.1.0&request=GetFeature&typeName=paisaje:PICA_2018&outputFormat=application/json"
});
let localizador = new M.layer.GeoJSON(
{name: "Localizador",
url: "http://www.iaph.es/ide/localizador/wfs?service=WFS&version=1.1.0&request=GetFeature&typeName=localizador:localizador&outputFormat=application/json"
});
//var layer = new M.layer.GeoJSON(
// {name: "Provincias",
// url: "http://geostematicos-sigc.juntadeandalucia.es/geoserver/tematicos/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=tematicos:Provincias&maxFeatures=50&outputFormat=application/json"});
//myMap.addLayers(layer);
myMap.addLayers(paisajes);
myMap.addLayers(localizador);
myMap.addPlugin(mp);