354
Views
8
Comments
Solved
[Native Geocoder Plugin] how to get Location address from latitude and longitude in reactive
native-geocoder-plugin
Mobile icon
Forge asset 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.

2017-07-05 22-17-18
Henrique Batista
Staff
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

2018-10-24 21-57-04
Gabriel Tavares

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.

UserImage.jpg
Dev Limbachia

Hello Henrique,

Can I know which component you are using?

As shown in your attachment, which is Google_Map component, I'm unable to find it anywhere.

Please respond.

Thank you

2017-07-05 22-17-18
Henrique Batista
Staff
2019-11-08 16-23-42
César Mateus Conceição

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

2018-10-24 21-57-04
Gabriel Tavares

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. 

2019-11-08 16-23-42
César Mateus Conceição
2018-10-24 21-57-04
Gabriel Tavares

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. 

2017-07-05 22-17-18
Henrique Batista
Staff
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

2018-10-24 21-57-04
Gabriel Tavares

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.

UserImage.jpg
Dev Limbachia

Hello Henrique,

Can I know which component you are using?

As shown in your attachment, which is Google_Map component, I'm unable to find it anywhere.

Please respond.

Thank you

2017-07-05 22-17-18
Henrique Batista
Staff
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.