[Ej] GeoJSON Turismo LatLon

by Francisco

HTML

<script src="http://mapea4-sigc.juntadeandalucia.es/js/mapea-5.0.1.ol.min.js"></script>
<link rel="stylesheet" href="http://mapea4-sigc.juntadeandalucia.es/assets/css/mapea-5.0.1.ol.min.css">
<script src="http://mapea4-sigc.juntadeandalucia.es/js/configuration-5.0.1.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: ["mapa"]
});


//{"ID":10,"NOMBRE":"C�RDOBA","LATITUD":"37.90402109578513","LONGITUD":"-4.803995130350813"}
//{"ID":17,"NOMBRE":"�BEDA Y BAEZA","LATITUD":"38.00468187978495","LONGITUD":"-3.42871491845699"}
//GeoJSON local
mapajs.addLayers(new M.layer.GeoJSON({
  source: {
    "crs": {
      "properties": {
        "name": "EPSG:4326"
      },
      "type": "name"
    },
    "features": [{
      "properties": {
        "ID": 10,
        "NOMBRE": 'CÓRDOBA'
      },
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [-4.803995130350813, 37.90402109578513]
      }
    },
    {
      "properties": {
        "ID": 17,
        "NOMBRE": 'ÚBEDA Y BAEZA'
      },
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [-3.42871491845699, 38.00468187978495]
      }
    }],
    "type": "FeatureCollection"
  },
  name: 'prueba'
}));