更快地升级Gmap v2到v3的提示
升级完我的代码后,我在这里提供了最新的提示来升级你的代码。 添加其他如果你喜欢。
使用:新的google.maps. 代替G …
-
GLatLngBounds()– >google.maps.LatLngBounds() -
GlatLng– >google.maps.LatLng -
GPoint– >google.maps.Point -
Event.addListener– >google.maps.event.addListener -
map.getInfoWindow().getPoint– >google.maps.getPosition() -
markers[i].getPoint()– >markers[i].getPosition() -
closeInfoWindow()– >map.InforWindow.Close(); -
map.getBoundsZoomLevel(bounds)– >map.fitBounds(bounds) -
markers[i].setImage– >.setIcon -
map.InfoWindow.close()– >创build一个函数closures - 在地图中find对象 – >
$('#id')[0]或$('#id').get(0)或document.getElementbyId
快乐的编码。