How to remove circle from Google Maps V3?

拟墨画扇 提交于 2019-12-10 19:17:46

问题


I have drawn circle using

    circle = new google.maps.Circle({
    map: map,
    radius: r,    // 1 miles in metres = 1609.3 m
        strokeWeight:1,
        strokeOpacity:0.5,
        fillOpacity:0.2,
        fillColor: '#AA0000'
    });
    circle.bindTo('center', marker, 'position');

How to remove circle from the map ?


回答1:


circle.setMap(null);

will remove the circle



来源:https://stackoverflow.com/questions/8260029/how-to-remove-circle-from-google-maps-v3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!