Comportamiento Popup

by SIGC GUADALTEL

HTML

<link rel="stylesheet" href="https://mapea4-sigc.juntadeandalucia.es/assets/css/mapea.ol.min.css">
<script src="https://sigc.desarrollo.guadaltel.es/mapea42_dev/js/mapea.ol.min.js"></script>
<script src="https://sigc.desarrollo.guadaltel.es/mapea42_dev/js/configuration.js"></script>
<div id="map">
</div>

CSS

html,
 body {
   margin: 0;
   padding: 0;
   height: 100%;
   overflow: hidden;
 }

JavaScript

// constructor del mapa
let mapajs = M.map({
  container: "map",
  projection: "EPSG:4326*d",
  layers: ["OSM"],
  center: {
    x: -5.9584180843195425,
    y: 37.36912689160224
  },
  zoom: 5,
  controls: ['layerswitcher', 'overviewmap'],
});

let points = new M.layer.GeoJSON({
  name: 'points',
  source: {
    "type": "FeatureCollection",
    "features": [{
        "type": "Feature",
        "properties": {
          "prop": "propiedad"
        },
        "geometry": {
          "type": "Point",
          "coordinates": [-6.207275390625,
            38.06971703320484
          ]
        }
      },
      {
        "type": "Feature",
        "properties": {

          "prop": "propiedad"
        },
        "geometry": {
          "type": "Point",
          "coordinates": [-5.6689453125,
            38.013476231041935
          ]
        }
      },
      {
        "type": "Feature",
        "properties": {

          "prop": "propiedad"
        },
        "geometry": {
          "type": "Point",
          "coordinates": [-5.5810546875,
            37.243448378654115
          ]
        }
      },
      {
        "type": "Feature",
        "properties": {
          "prop": "propiedad"
        },
        "geometry": {
          "type": "Point",
          "coordinates": [-4.89990234375,
            37.44433544620035
          ]
        }
      },
      {
        "type": "Feature",
        "properties": {
          "prop": "propiedad"
        },
        "geometry": {
          "type": "Point",
          "coordinates": [-6.2237548828125,
            37.23032838760387
          ]
        }
      },
      {
        "type": "Feature",
        "properties": {
          "prop": "propiedad"
        },
        "geometry": {
          "type": "Point",
          "coordinates": [-6.520385742187499,
            37.70120736474139
          ]
        }
      }
    ]
  }
});
let polygons = new M.layer.GeoJSON({
  name: 'polygons',
  source: {
    "type": "FeatureCollection",
   ...