Tools

Namespaces

Variants

Views

Actions

Search

Contents

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Postconditions

If the device object exists, the widget pops up an alert box with the latitude and longitude acquired from the active positioning system on the device.

Otherwise an alert box with the text 'device object cannot be found' is shown to the user.

Please note that the GetLocation call used in this example is synchronous and may block your widget for a while, depending on the used positioning system. Check out the WRT Developer's Library for an example on calling the asynchronous version of the function.

You might want to install the simulation PSY to your device to remove the dependency to the availability of real positioning data.