Mobile Browser Simulator geolocation widget
The geolocation widget can be used to provide a simulation of the device's geolocation information to the application. The application can access this information using the W3C geolocation APIs or MobileFirst location services APIs for hybrid applications.
Location services for hybrid applications are only supported for Android, iOS, and Windows Phone 8. Other platforms must be removed.
The geolocation information can be directly configured in the widget.
![]()
Use the Latitude and Longitude options to set specific GPS coordinates. We can click the map to update the latitude and longitude. A Heading of 0o corresponds to North. By clicking the Play, the device's movement is simulated from the current location in the direction that is given by Heading, at the speed specified. An update is given once a second. After you click Play, the button changes to Stop, and clicking it stops the simulation. Alternatively, a single 1-second step can be taken using Step.
To simulate various errors that might occur, select the appropriate error and click Generate Error. This action causes the next call to a geolocation API to have its failure function is called with the selected error.
Accuracy is used to set the accuracy of the position, and can affect geofences when you are using the confidenceLevel parameter. See Triggers.
Altitude and Altitude Accuracy appear in the position information, but are not used by location services APIs.
We can use Step and Play to simulate the movement of devices. For example, if the Speed setting is increased, we can see the effect in the simulator window by clicking Step to generate a new set of values for the app, or Play to generate new values periodically.
Parent topic: Test hybrid location service applications