[Native Geocoder Plugin] how to get Location address from latitude and longitude in reactive
Forge component by Henrique Batista
Application Type
Reactive
Service Studio Version
11.10.17 (Build 40598)

Hi community,

I need to get the location from the lat and long. in reactive. In mobile we have the native geocoder plugin, but in reactive i not found any solution. Anyone knows how is it possible on a reactive app?


Thanks.

Solution

Hi Gabriel,

You can use the Google Maps component, inside you'll find actions:

You'll need an API key from https://console.developers.google.com/, where you'll need to have at least the Geolocation API enabled for this key.

Cheers

Hi Henrique, 

Initially I didn't have the API key and and I was trying to get around with another component, but I solved the problem getting the API Key, thanks.

Hi Gabriel

You can with no much effort with javascript.
As you can see in my personal.

https://cesar-mateus.outsystemscloud.com/WebAppsTests/

Look at navigator.geolocation.getCurrentPosition

Reference: Using the Geolocation API

Hi César, thanks for your answer.

What I really need is getting the full address using the current coordinates.  I'm using getCurrentPosition to get the user coordinates but I need to convert the coordinates to a City name. 

As we have on Native geocoder plugin the action - CoordinatesToAddress - I need the same function for reactive. The leaflet as you suggested, don't give the city name. Note: I don't have on server the coordinates linked to a city as we can see on leaflet demo. 

Solution

Hi Gabriel,

You can use the Google Maps component, inside you'll find actions:

You'll need an API key from https://console.developers.google.com/, where you'll need to have at least the Geolocation API enabled for this key.

Cheers

Hi Henrique, 

Initially I didn't have the API key and and I was trying to get around with another component, but I solved the problem getting the API Key, thanks.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.