百度地图api在Html中显示,在jsp页面中不显示解决方法

在jsp页面中显示如下

但是在html中正常显示。

原来的代码如下:

<script type="text/javascript" src="http://api.map.baidu.com/api?key=&v=1.1&services=true"></script>

后来更改成

<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.4"></script>

百度地图api就能正常运行了

具体什么原因,暂时不清楚。百度地图api1.4以下不需要密钥

原文地址:https://www.cnblogs.com/jianshuai520/p/8657714.html