[Wiki] Mapea4 - KML
by Francisco
HTML
<link rel="stylesheet" href="https://mapea4-sigc.juntadeandalucia.es/assets/css/mapea-5.0.0.ol.min.css">
<script src="https://mapea4-sigc.juntadeandalucia.es/js/mapea-5.0.0.ol.min.js"></script>
<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
// capa KML pasada en el constructor
/*mapajs = M.map({
container:"map",
controls: ["layerswitcher"],
center: [548830,4077720],
zoom: 8,
layers: ["KML*capaKML*http://mapea-sigc.juntadeandalucia.es/sepim_server/api/datos/kml/1194/item/469*true"]
});
*/
mapajs = M.map({
container: "map",
controls: ["layerswitcher", "mouse"],
//center: [320000, 4170000],
//zoom: 2,
wmcfile: ["mapa"],
layers: [new M.layer.KML({
url: "http://mapea4-sigc.juntadeandalucia.es/files/kml/arbda_sing_se.kml",
name: "Arboleda",
//extract: true
},{},{
extractStyles: false,
showPointNames: false,
})]
});