百度地图报错
来源: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)00
相似问题
关于百度地图的离线使用
回答 1
要是使用 百度地图 必须要联网吗?
回答 1