Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 google maps api v3 web 应用程序有一个侧面板,我想添加在单击按钮时更改到预定义位置和缩放的功能。我在想 javascript 是我只是不确定如何实现的答案。预先感谢您的帮助。
这是一个代码片段:
<script> function ZoomAndCenter() { map.setCenter(new google.maps.LatLng(-34.397, 150.644)); map.setZoom(15); } </script> <a href="javascript:ZoomAndCenter()">Move to location</a>