problem with LocationAPIKey

LocationAPIKey not published and I can't set value to ti in design time and ALWAYS got exception when object created with DefaultToCurrentLocation=true


unit FMX.TMSWebGMaps, line 3704:

    if LocationAPIKey = '' then
      raise Exception.Create('Missing LocationAPIKey');

Hi,


Please note that the LocationAPIKey is required when DefaultToCurrentLocation is True.
Here's an example of you how you can set the LocationAPIKey programmatically:

  TMSFMXWebGMaps1.APIKey := 'abc123';
  TMSFMXWebGMaps1.LocationAPIKey := 'xyz987';
  TMSFMXWebGMaps1.MapOptions.DefaultToCurrentLocation := True;

Where do you obtain a LocationAPI key. I can't find it listed under the google API's to be able to add it?

Hi,


The Location APIKey can be retrieved from https://api.ipstack.com/check
I have set the APIKey and the LocationAPI key with the APIKey registered at www.ipstack.com

When I add this line to the FormCreate event, the application simply hangs.

What am I doing wrong?

Your user manual really needs to be updated as well, as it is incorrect.

Hi,


We are not aware of any issues that would cause the application to hang when using the LocationAPIKey.
Please note that currently the free API key tier from IPStack is not supported. This will change with the next release.

Example:
procedure TForm1.FormCreate(Sender: TObject);
begin
  TMSFMXWebGMaps1.APIKey := 'APIKey';
  TMSFMXWebGMaps1.LocationAPIKey := 'LocationAPIKey';
  TMSFMXWebGMaps1.MapOptions.DefaultToCurrentLocation := True;
end;

I guess you will be releasing a new version pretty soon then if the free API key tier from IPStack is not supported?

I went and upgraded to the subscription mode at www.ipstack.com because your components do not work with the Free testing option at www.ipstack.com.

I finally got the DefaultToCurrentLocation working, but is totally useless as it shows my location as being 500 miles away where my internet provider is located. So absolutely useless in my opinion for a mobile app.

I will no go back to trying to get your component to function with TLocationSensor which also does not seem to work as expected. :(

Hi,

We also noticed that in some cases the results from IPStack are pointing to the ISP location. Unfortunately we have no control over the data returned from IPStack.
Note that support for free IPStack API keys will be available with the next TMS FMX WebGMaps release.

Alternatively you might want to take a look at TMS FNC Maps.
This product supports the Google Location API which we have found to return much more precise location data.