使用gpson_btn我需要删除地理更新......
gpsoff_btn.addEventListener(MouseEvent.CLICK, geoON);
function geoON(event: Event): void {
if (Geolocation.isSupported) {
var geo = new Geolocation();
geo.setRequestedUpdateInterval(1);
geo.addEventListener(GeolocationEvent.UPDATE, geolocationUpdateHandler);
gpsoff_btn.visible = false;
}
}
答案 0 :(得分:0)
我找到了解决方案!
gpson_btn.addEventListener(MouseEvent.CLICK, geoOFF);
function geoOFF(event: Event): void {
geo.removeEventListener(GeolocationEvent.UPDATE, geolocationUpdateHandler);