Comments (5)
After some more tests, I get these messages pointing to those files (Chrome and FF):
AggregateError: Request failed
CustomAggregateError utils.js:151
fetch blockedsource.js:153
[console.js:62:10](http://localhost:5173/node_modules/ol/console.js)
error console.js:62
GeoTIFFSource GeoTIFF.js:482
Any thoughts?
my .htaccess
has the following based on e.g. this:
Header set Accept-Ranges none
RequestHeader unset Range
#######
#Header set Accept-Ranges none Request
#Header unset Range
#Header set Access-Control-Allow-Headers "range"
#######
#Header add Access-Control-Allow-Origin *
#Header add Access-Control-Allow-Methods: "PUT, GET, POST, DELETE, OPTIONS"
#Header always set Access-Control-Allow-Origin *
#Header set Access-Control-Allow-Headers "origin, x-requested-with, content-type, authorization, range"
#Header set Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"
Uncommenting the options above do not solve the issue (ie. one by one, all together). BTW, all my COG GeoTIFFs (76 in total) are located in one of my HD partitions (D), while my OL directory is in the Linux partition (C), can this be related? also, I am using symbolic links to my COG files (I did some tests with the GeoTIFF itself in the same directory where the main.js
is located, thus, no effect the same error occurs).
from openlayers.
Just an update, with curl:
curl 'http://localhost:5173/raster/mb_pd_cr.tif' -I
the result is:
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 4736
Content-Type: image/tiff
Last-Modified: Tue, 05 Mar 2024 00:45:55 GMT
ETag: W/"4736-1709599555557"
Cache-Control: no-cache
Date: Thu, 14 Mar 2024 22:33:29 GMT
Connection: keep-alive
Keep-Alive: timeout=5
the size of the file is 4.7K (4736 in Content-Length and ETag). From this I understand that the server response is ok, so, the problem with the 416 error message is in Chrome and FireFox? Do you know if this can be a problem with Apache2? Where can I keep digging to find the solution? Thanks for any pointers.
from openlayers.
Found it finally. After reading some posts about apache2
, it seems that my OL directory has to be placed in /var/www
. Once there, all COG GeoTIFF files loaded correctly. For some reason (most likely due to the way apache2.conf
has been modified), there are restrictions to send requests from directories outside /var/www
(at least what I understood from these tests). Hopefully this will help someone else out there!
from openlayers.
All those files work for me in v8.2.0 and v9.0.0. It might be a browser or server issue such as noted in #14926 (comment) .
What happens if you load from a blob as in https://openlayers.org/en/latest/examples/cog-blob.html ?
from openlayers.
Thanks for the reply, the "ranges"
trick in .htaccess
did not work unfortunately, it keeps saying:
Failed to load resource: the server responded with a status of 416 (Range Not Satisfiable)
What else can it be done to overcome this issue? I will try the blob
option as suggested and come back with some more updates.
from openlayers.
Related Issues (20)
- Sometimes OpenLayers on iOS will zoom in or out with a single finger gesture. HOT 1
- Missing tiles in WebGLTileLayer with a GeoTiff source HOT 4
- webgltilelayer style filter
- Operator support for Id is missing on gpu
- Support OSM XML metadata (timestamp, etc) HOT 3
- olopenlayer in local HOT 1
- viewport Bug HOT 1
- Multistyle multigeometry draw bug HOT 3
- Regression on Drawing Rectangle with RenderEvent.context (Rotating the Map) HOT 7
- When trying to use dimensionless SVG as icon: "Passed-in canvas is empty" HOT 1
- Reprojection issues with `wrapX: false`
- Type VectorSource<Feature<Geometry>> is not assignable to type VectorSource<FeatureLike> HOT 12
- TypeScript: `VectorSource<Feature<Point>>` can't be used as a source for `VectorLayer` HOT 1
- Default generic type of VectorSource not compatible with VectorLayer HOT 3
- 用于银河麒麟系统时,web多次缩放地图后,前端不再发出瓦片请求 HOT 6
- VectorLayerOptions does not use the same generic type as VectorLayer HOT 11
- ACCUSATION MESSAGES DISPLAYED ON THE MAP ON LAT LON 51.94599:7.7041138 HOT 9
- Empty map when returning to tab in Google Chrome? HOT 3
- Modify interaction options and cluster source options optional HOT 3
- WrapX doesn't work When I use custom coordinate system BD09; HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openlayers.