0

当我点击我的超链接时,我无法使用 Google Maps API v3 进行放大/缩小。我让它在 v2 中工作:

<a href="javascript:map.setCenter(new GLatLng(58.37,62.66), 16);map.setMapType(G_SATELLITE_MAP);" >Some Place</a>

在 v3 中,我尝试过:

<a href="javascript:map.setCenter(new google.maps.LatLng(58.37,62.66));">Some Place</a>

我该如何解决这个问题?

4

1 回答 1

2

在 v3 中,您还必须调用setZoom

<a href="javascript:map.setCenter(new google.maps.LatLng(58.37,62.66));map.setZoom(16);">Some Place</a>
于 2012-09-12T01:41:49.077 回答