In some applications, manual updating of location may not be desirable, for example, if your application is expected to update the location periodically to show the path in which a vehicle is moving. In this recipe, we will see how to configure the Ext.util.GeoLocation
class to have the location automatically updated and how to control the frequency with which the location update should be attempted.
Make sure that you have set up your development environment by following the recipes outlined in Chapter 1.
Carry out the following steps;
Set the following properties on the
Ext.util.GeoLocation
class while instantiating:autoUpdate: true, timeout: 5000, //5 sec
Deploy and access it from the device of your choice.