报错:
Mixed Content: The page at 'https://xxxxxxx' was loaded over HTTPS, but requested an insecure script 'http://api.map.baidu.com/api?v=2.0&ak=mybaiduak'. This request has been blocked; the content must be served over HTTPS.
HTTPS中调用百度地图API - BMap is not defined

Uncaught ReferenceError: BMap is not defined
HTTPS中调用百度地图API - BMap is not defined

解决

在调用百度地图API的URL中加&s=1

<script src="https://api.map.baidu.com/api?v=2.0&ak=my-baidu-ak&s=1" type="text/javascript"></script>

相关文章:

  • 2022-01-04
  • 2021-05-19
  • 2022-12-23
  • 2022-12-23
  • 2021-05-27
  • 2021-10-18
猜你喜欢
  • 2021-12-13
  • 2022-12-23
  • 2022-12-23
  • 2023-03-05
  • 2022-12-23
  • 2021-08-10
  • 2022-12-23
相关资源
相似解决方案