Description:
· Ext.Map – maprender() function in which Ext.util.geolocation has been used,locationupdate does not fire instead locationerror is fired at all times, displaying that the last location provider was disabled
Steps to reproduce the problem:
· Create Ext.Map with maprender function and determine the geolocation using Ext.util.geolocation, the locationupdate does not work.
The result that was expected:
· The location update needs to fire and return the user’s current location(latitude,longtitude)
The result that occurs instead:
· The user’s location is unavailable.
Test Case:
Code:
var geo = Ext.create('Ext.util.Geolocation', {
autoUpdate: false,
listeners: {
locationupdate: function (geo) {
var currentLat = geo.getLatitude();
var currentLng = geo.getLongitude();
var altitude = geo.getAltitude();
var speed = geo.getSpeed();
var heading = geo.getHeading();
},
locationerror: function (geo, bTimeout, bPermissionDenied, bLocationUnavailable, message) {
if (bTimeout)
Ext.Msg.alert('Timeout occurred', "Could not get current position");
else
Ext.Msg.alert('Location Unavailable.', message);
}