Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

FMXWebGMaps - Android

 Post Reply Post Reply
Author
Graham Powell View Drop Down
New Member
New Member
Avatar

Joined: 29 Sep 2014
Posts: 31
Post Options Post Options   Quote Graham Powell Quote  Post ReplyReply Direct Link To This Post Topic: FMXWebGMaps - Android
    Posted: 03 Feb 2017 at 3:41pm
This must be simple to do, but I can't seem to get it to work. All I want to do is to run WebGMaps on my Android phone and for it to show me where I am. I would have thought the GetCurrentLocation would be the starting point. What I get seems to be different depending upon where I am. At home it tells me I am about 200km north east. In the office it tells me I am about 100km south of my true location. The phone in running V6.0.1 and I am using the latest TMS components.

The demo program seems to do everything you would ever need except this, so I am wondering if there is a reason why this does not work.

Any clues or example code much appreciated
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2213
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 06 Feb 2017 at 9:05am
Hi,

We are not aware of any issues with using the GetCurrentLocation call on Android.
Note that this call performs an API call to "freegeoip.net" to retrieve your current location based on your IP address. This API Is not related to the Google Maps API.
Can you please try to navigate to the following URL in your browser and check if the returned data is correct?

Example:



Edited by Bart Holvoet - 06 Feb 2017 at 9:05am
Back to Top
Graham Powell View Drop Down
New Member
New Member
Avatar

Joined: 29 Sep 2014
Posts: 31
Post Options Post Options   Quote Graham Powell Quote  Post ReplyReply Direct Link To This Post Posted: 06 Feb 2017 at 9:51am
Clearly this is the problem. freegoip.net give the same incorrect result.The IP address is probably something to do with my Internet Service Provider which could be anywhere. I'll do a test on my phone when I am not using the WiFi but just the 4G.
Back to Top
Graham Powell View Drop Down
New Member
New Member
Avatar

Joined: 29 Sep 2014
Posts: 31
Post Options Post Options   Quote Graham Powell Quote  Post ReplyReply Direct Link To This Post Posted: 06 Feb 2017 at 2:02pm
The solution seems to be to use the standard Delphi TLocationSensor to get the coordinates of my current location and then feed that information into the TMS GMap component.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down