当我尝试使用jQuery ajax从我的html页面调用graphhopper路由服务时出现此错误。当我在浏览器中运行html页面但在我在Web服务器上托管页面时无法工作时,它可以正常工作。
$.ajax({
timeout: 5000,
url: https://graphhopper.com/api/1/route?locale=en&.... points and key ,
type: "GET",
dataType: "json",
crossDomain: true
})
阻止跨源请求:同源策略禁止在https://graphhopper.com/api/1/route?locale=en&point
读取远程资源