百度地图报错

来源:7-5 百度地图绘图(上)

从初级前端到架构

2022-11-27

Access to XMLHttpRequest at ‘https://miao.baidu.com/abdr?_o=file%3A%2F%2F’ from origin ‘null’ has been blocked by CORS policy: The value of the ‘Access-Control-Allow-Origin’ header in the response must not be the wildcard ‘*’ when the request’s credentials mode is ‘include’. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
miao.baidu.com/abdr?_o=file%3A%2F%2F:1 Failed to load resource: net::ERR_FAILED
报这个错,但是能加载地图。

写回答

1回答

扬_灵

2022-11-29

同学你好,这个一般是跨域问题,你可以看下这种类型的如何解决,一般是配置跨域就行了,你看下你配置的百度地图的地址是否正确,提供一个文档地址((20条消息) 前端跨域问题的解决方案Access to XMLHttpRequest at ‘http..’ from origin ‘null‘ has been blocked by CORS policy_芒果mmmmg的博客-CSDN博客_access to xmlhttprequest
0
0

数据可视化入门到精通-打造前端差异化竞争力

同级别前端,掌握数据可视化薪资更高

1520 学习 · 1043 问题

查看课程