我在 map 上有一个圆圈需要更新,这是一种方法:
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);
出于某种原因,我觉得这不太优雅。这是最好的方法吗?
最佳答案
根据the documentation ,你应该能够做到这一点
circle.setOptions( circleopts );
关于javascript - 谷歌地图叠加更新技术,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3925632/