PDA

View Full Version : change autoupdate to false with a button?



Chanckjh
7 Apr 2012, 1:07 AM
Hi, I have a map with geolocation. It's set with autoUpdate: true. I want a button to set it to false, but I don't know how to do this. In javascript/html I could do onclick change to false etc. But how do I do this in Sencha Touch?



listeners:{
geo = Ext.create('Ext.util.Geolocation', {
frequency : 3000,
autoUpdate : true,
allowHighAccuracy : true,
listeners : {}
}
}

mitchellsimoens
8 Apr 2012, 7:19 AM
execute setAutoUpdate(false) on the geolocation class.