How to get the location where a webpage....

How to get the location where a webpage....

  

How to get the location (city, country) where a webpage was accessed through a smartphone? Is there any way with the P10?


Hello Jorge.

I'm not sure if there's already a solution "out of the box", but if you combine different tools it should be straight forward.

There's a plugin in the forge that will allow you to get the user's location. After you get the coordinates, you can use an API like Google Geocoding API to translate coordinates into addresses. Here's an example using OutSystems Portugal coordinates.


well, the plugin is only available for the mobile platform, and I have a desktop platform in p10... (with one webpage only for mobile use).

is there another way?

Hello Jorge.

I'm not sure what's the best option to do it in web responsive, but there's also a plugin in the Forge that allows you to get the user's location. It uses HTML5 geolocation feature.

Then you would still have to use an API like Google Geocoding API to translate coordinates into addresses.