Page 1 of 1

GEO Codes in a mobile app

Posted: Mon Feb 13, 2017 9:26 am
by devinst
I am creating a mobile app and am using the "pui.capturePhoto" function to allow picture taking on the mobile device. Is there a similar function that will allow me to grab the current latitude and longitude from the device?
Thanks.!!!

Re: GEO Codes in a mobile app

Posted: Mon Feb 13, 2017 9:40 am
by Scott Klement
The latitude and longitude are just variables you can retrieve in the display's JavaScript. Not sure why you'd want to upload them to the IFS?

Re: GEO Codes in a mobile app

Posted: Mon Feb 13, 2017 10:24 am
by devinst
I didn't realize that it would be that simple. I was thinking there would be a function to have the device return them. Can you give me the variable names that I would use to retrieve them? As you said, there is no need to upload them to the IFS, I just want to make the accessible to the RPG program.
Thanks.!!

Re: GEO Codes in a mobile app

Posted: Mon Feb 13, 2017 11:13 am
by Glenn
I believe Scott may have been alluding to the Navigator object available via JavaScript.

http://www.w3schools.com/html/html5_geolocation.asp

Glenn

Re: GEO Codes in a mobile app

Posted: Mon Feb 13, 2017 5:00 pm
by devinst
I got it going.!!! Thanks Everyone!!