0

Hello,

I have been playing around with an instance OSRM old api version 4.0 with an instance of the open street map website.

I have setup OSRM with a small extract and it serves perfectly fine returning directions if requested through the browser.

When I try to send the request through my open street map website I get a 200 ok with the following error (In firefox and chrome):

XMLHttpRequest cannot load http://osrmURL/viaroute?z=14&output=json&instructions=true&loc=39.0704%2C-76.5452&loc=38.9786%2C-76.4928. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://osmwebsiteURL' is therefore not allowed access.

I must be missing something, but can't seem to find the issue.

Thanks.

asked 25 Oct '16, 13:45

Cellington's gravatar image

Cellington
2168914
accept rate: 0%


One Answer:
1

I upgraded to osrm version 4.6 (with CORS support) and now everything works great.

permanent link

answered 25 Oct '16, 16:07

Cellington's gravatar image

Cellington
2168914
accept rate: 0%

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×263
×80
×60
×2

question asked: 25 Oct '16, 13:45

question was seen: 2,304 times

last updated: 25 Oct '16, 16:07

powered by OSQA