I'm using flex 4.6 mobile application my issue when i get the current location using gps sensors it take alot of time Within the limits of 35 sec to take 2 updates my code is
protected function GetGPSposition():void
{
//Initialize the location sensor.
geo = new Geolocation();
if(! geo.muted){ //gps is enabled
geo = new Geolocation();
geo.setRequestedUpdateInterval(10);
geo.addEventListener(GeolocationEvent.UPDATE, handleLocationRequest);
geo.addEventListener(StatusEvent.STATUS,handleErrorGPS);
}
else if(geo.muted){ //gps is disabled
(new GPS2()).open(this, false) ;
internetGpsEnable = false ;
}
}
protected function handleLocationRequest(event:GeolocationEvent):void
{
counter++ ;
if (counter > 1)
{
long = event.longitude;
lat = event.latitude;
internetGpsEnable =true ;
lblGPS.text = null;
}
}
Note : GetGPSposition() worked in creationComplete Can any one to advice me if any method to get the longitude and latitude fast as possible . Thanks in advance for help.