Search code examples
htmlvectorarcgisopenlayers-3shapefile

Points on a webmap openlayers


I have very little experience in GIS. I am working on a project were I need to put around 120 coordinate points on a web map using openlayers 3. There are also attributes associated with these points. I added the points from a csv into arcGis. I turned them into a shapefile. I also have a web map with a satellite image of the area. It works and opens in a browser.Now what do I do? Can someone point me in the right direction. Thank you


Solution

  • The shapefile can be converted into a GeoJSON (e.g. with an online service or QGIS. The GeoJSON can then directly be consumed by OpenLayers:

    map.addLayer(new ol.layer.Vector({
      source: new ol.source.Vector({
        format: new ol.format.GeoJSON(),
        url: 'path/to/your.geojson'
      });
    });