Coder Social home page Coder Social logo

CORS issue in browsers about bedrock-viz HOT 2 OPEN

bedrock-viz avatar bedrock-viz commented on June 5, 2024
CORS issue in browsers

from bedrock-viz.

Comments (2)

GRMule avatar GRMule commented on June 5, 2024

I spent some time trying to use various tricks. no luck.

Something I kind of got fixated on was that OpenLayer will render Base64 data just fine. ImageStatic's src property just jams itself into an img tag, and if you feed it base64 it is perfectly happy with it. That got me to thinking -- can the backend write a file that maps filename -> base64 data of the image, in a large file that just has K:V mapping for all the files? If the map script loaded that file, whenever an image is to be loaded it can use the bsae64 data, which has no "origin" and thus completely side-steps the issue. I think the backend could still write the image files to disk, but if it were creating that map the front-end uses, it might also not be necessary to output the image files any longer. This approach has the significant advantage of being cross-browser and cross-platform.

Other than that, I didn't have any luck. I don't have Firefox, but FF Dev Edition also throws the error.

from bedrock-viz.

amatulic avatar amatulic commented on June 5, 2024

Viewing the bedrock-viz maps with a node.js server is working well for me. See #159 - I made a node.js server app that has a front end "helper" to maintain your collection of maps as well as view them.

from bedrock-viz.

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.