2010-10-13 137 views
0

我有一個地圖,我需要更新了一圈,這裏是做這件事:谷歌地圖覆蓋更新技術

circleopts.radius=100*distance; 
// delete old circle overlay 
circle.setMap(null); 
// create new circle overlay 
circle = new google.maps.Circle(circleopts); 
// display new circle overlay 
circle.setMap(map); 

出於某種原因,我不覺得這是非常優雅。這是做這件事的最好方法嗎?

回答

4

the documentation,你就應該能夠做到這一點

circle.setOptions(circleopts); 
+0

尼斯,謝謝,我無法找到 – standup75 2010-10-13 16:49:10