Thursday 18 January 2018

OpenLayers 3 GeoJSON not loading


I am having trouble loading a GeoJSON layer (below is my defintion). Everything works fine when I read the file locally in a web browser, e.g. file:///Z:/inetpub/wwwroot/bang.html. However, when I try to access the site through the domain, e.g www.daverules.com/bang.html, none of my GeoJSON layers show up.


It should also bear mentioning that I have a couple of Leaflet maps that will load GeoJSON with similar URLs without issue.


var wellsLayer = new ol.layer.Vector({
source: new ol.source.GeoJSON({
projection: 'EPSG:3857',
url: "./data/WELLS.geojson"
}),
name: 'Wells',

style: customStyleFunction
});

Response from the server is as follows. It shows file not found, however, I am pretty sure it is there.


GET http://daverules.com/data/WELLS.geojson 404 (Not Found)


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...