[Location Plugin] LocationPlugin returns wrong position

Forge Component
Published on 19 Mar by OutSystems R&D
26 votes
Published on 19 Mar by OutSystems R&D


I use function GetLocation every 2 seconds on my screen. The function takes value True to the parameter EnableHighAccuracy but it returns me wrong position like it determines via network-based methods.

What I'm doing wrong?

what is your Timeout and maximumage?

And do you get isSuccess = true ?

Yes, I always get success status on receiving location. As you can see in the excel file location jumps from point to point and not corresponding to the real location.

If you are somewhere in Donetsk, the plugin is working. Perhaps your phone has some accuracy features turned off?

If you are only using GPS, your position will be less accurate.

As it is said in the description of the GetLocation parameter EnableHighAccuracy "Provides a hint that the application needs the best possible results. By default, the device attempts to retrieve a Position using network-based methods. Setting this property to true tells the plugin to use more accurate methods, such as satellite positioning."

I set this parameter to True. It must get location via GPS. But it seems that it gets location via network-based methds.

When I use WatchPosition function with LocationTracker widget the location is very accurate. But such method genegets too many function calls (about 2 or 3 call per second). It is too many for my app. And I decided to try GetLocation function instead. I call it every 2 seconds.


I did this in the OnReady of my screen:

And this in the GetCurrentLocation :

And it works just fine.


Why do you use WatchPosition? Is it realy nessesary to use GetLocation only in conjunction with WatchPosition?

I had lots of trouble with accuracy as well. So I used the watch to get the best Location. This cause my screen to update a lot, so i added the check to only update when location changed.

I'm not sureif this is the best way, but it got the best results for me. Now it works stable and accurate and i don't think i get that many function calls.

Thank you.

Do you use LocationPlugin in conjunction with map? May by Google Maps? I have some truble with GoogleMaps https://www.outsystems.com/forums/discussion/51860/google-maps-mobile-how-to-change-location-of-markers-dynamically/

If you pointed with the issue I described and you have a solution could you please writhe there?

I added it to my ToDo App.

You will need to install some items from forge or you can just look at the location screen.