Comments (7)
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.
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.
Oh that makes sense. Thanks @kevinkreiser !
from lrm-mapzen.
@hanbyul-here I tested the link after replacing my own key, the message:
KeyError''valhalla-A4rESty'' is not a valid key.
from lrm-mapzen.
@rossanag your key shouldnt include the single quote character. it should just be api_key=valhalla-A4rESty
from lrm-mapzen.
@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.
@rossanag If you could solve your problem, would you close the issue?
from lrm-mapzen.
Related Issues (20)
- Example of bicycle routing with different types of bikes
- Sub-Route (transfer) bug HOT 1
- getting ready for leaflet 1.0 HOT 2
- add location hash for gh-pages example
- Error in Routing Calculations HOT 4
- Problem with pedestrian mode HOT 4
- Tune by Turn & Search for the destination HOT 3
- L.Routing.mapzenFormatter and options HOT 1
- Can't set the language to spanish HOT 8
- How to get a route without using the control? HOT 4
- Consider how to handle routing with multiple break points where some are along the way HOT 2
- Returning turn-by-turn data from a route. HOT 4
- Making the turn by turn example work with requirejs (r.js) HOT 2
- add a buffer to fitSelectedRoutes so pins don't get cut off HOT 1
- change too general class name HOT 1
- not passing some options HOT 1
- make default pins for the start and end of a route different colors
- fitBounds doesn't work with mapzenLine
- Add possibility to use your own Valhalla Server
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 lrm-mapzen.