657
Views
10
Comments
How to get google maps current location in web app?
Question

Hi Team,


I need some help to get google maps current location in web app browser.


Regards,

Naga

Rank: #318

Hi Naga,

You can try using HTML5 Geolocation feature to obtain the coordinates to use in the Google maps widget.


Cheers,

Tiago.

HTML5 Location will only works in HTTPS. 

Yup, it was just for info.

Rank: #17328

Tiago Gafeira wrote:

Hi Naga,

You can try using HTML5 Geolocation feature to obtain the coordinates to use in the Google maps widget.


Cheers,

Tiago.

Hi Tiago Gafeira, I am not getting that how can I use this javascript code in Outsytems, Can you please explain to me how to use this HTML5 Geolocation in Outsystems in order to display the current location on the map in the Web application.

I have already implemented the map and the marker on it based on interest point.

Rank: #1400

SyntaxEditor Code Snippet

"  
if (navigator.geolocation) {
              navigator.geolocation.getCurrentPosition(getPosition);
console.log('Testing1');
          } else {
             
      }

      function getPosition(position) {
console.log('Testing'2);
         '"+ Latitude +"'= position.coords.latitude;
           '"+ Longitude +"'= position.coords.longitude;
       
       }"


I have used this javascript in runjavascript action. Still the longitude and latitude value is not set. Please help me out