qgis2web is a plugin for QGIS which creates webmaps. This question is about its OpenLayers 3 export. It exports QGIS layers to geoJSON to pull into the OL3 map. It writes them in EPSG:3857 to match the default output projection.
However, I am trying to implement support for multiple projections in qgis2web. I believe that the correct approach would be to export the QGIS layers to EPSG:4326 geoJSON. I've implemented that.
However, I cannot get the points to display on the EPSG:3857 OL3 map. I've looked through the OL3 API, and I've only found that under ol.format.GeoJSON, the option defaultDataProjection exists. It's not clear to me whether I should set this to the JSON's projection 4326 or the map's 3857. I've tried both, but the points still do not appear.
A sample qgis2web OL3 map is here: https://www.dropbox.com/s/nyjvn8s0w14a04j/ol3map.zip?dl=0. Can anyone help me figure this out? What am I missing?
أكثر...
However, I am trying to implement support for multiple projections in qgis2web. I believe that the correct approach would be to export the QGIS layers to EPSG:4326 geoJSON. I've implemented that.
However, I cannot get the points to display on the EPSG:3857 OL3 map. I've looked through the OL3 API, and I've only found that under ol.format.GeoJSON, the option defaultDataProjection exists. It's not clear to me whether I should set this to the JSON's projection 4326 or the map's 3857. I've tried both, but the points still do not appear.
A sample qgis2web OL3 map is here: https://www.dropbox.com/s/nyjvn8s0w14a04j/ol3map.zip?dl=0. Can anyone help me figure this out? What am I missing?
أكثر...