Giter Site home page Giter Site logo

Comments (7)

hanbyul-here avatar hanbyul-here commented on August 27, 2024

Hey, I am not sure why cors error is happening, but I can see the url for httprequest is not well formatted. (which makes 403 error) There is only one location in query (more than one location should be passed to route between points), and also api key is wrapped as object. (api key should be string)

This is well formatted one. (Replace your-api-key part to your actual api key to see it working)

https://valhalla.mapzen.com/route?json={%22locations%22:[{%22lat%22:37.752,%22lon%22:-122.418,%22type%22:%22break%22},{%22lat%22:37.779,%22lon%22:-122.391,%22type%22:%22break%22}],%22costing%22:%22auto%22,%22directions_options%22:{%22language%22:%22es%22}}&api_key='your-api-key'

from lrm-mapzen.

kevinkreiser avatar kevinkreiser commented on August 27, 2024

yes we have an issue in which when the 403 comes back, it actually comes back from a different server than those who actually compute the routes, this server who sends the 403s doesnt send cors headers. this issue is being tracked here: kevinkreiser/prime_server#28

from lrm-mapzen.

hanbyul-here avatar hanbyul-here commented on August 27, 2024

Oh that makes sense. Thanks @kevinkreiser !

from lrm-mapzen.

rossanag avatar rossanag commented on August 27, 2024

@hanbyul-here I tested the link after replacing my own key, the message:
KeyError''valhalla-A4rESty'' is not a valid key.

from lrm-mapzen.

kevinkreiser avatar kevinkreiser commented on August 27, 2024

@rossanag your key shouldnt include the single quote character. it should just be api_key=valhalla-A4rESty

from lrm-mapzen.

rossanag avatar rossanag commented on August 27, 2024

@kevinkreiser thanks, it works, it returns a json file. I will try the whole code later to see if the 503 error is gone.

from lrm-mapzen.

hanbyul-here avatar hanbyul-here commented on August 27, 2024

@rossanag If you could solve your problem, would you close the issue?

from lrm-mapzen.

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.