Git Product home page Git Product logo

Comments (5)

ElGerys avatar ElGerys commented on September 26, 2024 1

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.

ElGerys avatar ElGerys commented on September 26, 2024 1

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.

ElGerys avatar ElGerys commented on September 26, 2024 1

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.

mike-000 avatar mike-000 commented on September 26, 2024

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.

ElGerys avatar ElGerys commented on September 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.