<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=.......&sensor=false&libraries=places"></script>
我想在上面的脚本中添加&libraries=geometry
,如何描述它?
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=.......&sensor=false&libraries=places&libraries=geometry"></script>
或
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=.......&sensor=false&libraries[]=places&libraries[]=geometry"></script>
答案 0 :(得分:2)
根据documentation,你应该用逗号分隔多个库:
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=.......&sensor=false&libraries=places,geometry"></script>
答案 1 :(得分:0)
你不能指定具有相同名称的变量,post / get脚本只会处理其中一个 我建议你用'libraries = places,geometry'替换'libraries = places&amp; libraries = geometry',看看它是如何运作的。