asapltda Posted April 24, 2016 Posted April 24, 2016 I want to retrieve latitude and longitude from geolocation ! Hello experts,I want to know, how would I retrieve Latitude and Longitude from geolocation. I want to send that via JSON param to my server for storing in my SQL database. Is it possible to get it as string? using unigui movile
lema Posted April 24, 2016 Posted April 24, 2016 I want to retrieve latitude and longitude from geolocation ! Hello experts, I want to know, how would I retrieve Latitude and Longitude from geolocation. I want to send that via JSON param to my server for storing in my SQL database. Is it possible to get it as string? using unigui movile Hello, I am getting lat & lng with a simple geolocation.getCurrentPosition() mgeolocation.zip
asapltda Posted April 25, 2016 Author Posted April 25, 2016 Thank you for the example sent Mr Lema. The example works in Windows 10 without any action . When I test the example in the mobile phone ( huawei Androit 4.2 ) it does not work me .Could you continue giving me some help I think this example is very valuable for those who started in this topic . Thanks again from Cali Colombia
lema Posted April 25, 2016 Posted April 25, 2016 Does your device share its location ? Can you check it with another browser ? I tested successfuly on iphone and Samsung mobile with Android 4.1.2 Also change the UnimButton1Click : procedure TMainmForm.UnimButton1Click(Sender: TObject); begin UniSession.AddJS( 'if (navigator.geolocation) { ' + ' navigator.geolocation.getCurrentPosition( function(position) { ' + ' ajaxRequest(MainmForm.UnimButton1, "CurrentPosition" ,' + ' ["lat=" + position.coords.latitude, ' + ' "lng=" + position.coords.longitude, ' + ' "acc=" + position.coords.accuracy, ' + ' "alt=" + position.coords.altitude, ' + ' "altacc=" + position.coords.altitudeAccuracy, ' + ' "head=" + position.coords.heading, ' + ' "ts=" + position.coords.timestamp ' + ' ]);' + ' })' + '} else {alert("Geolocation is not supported.");}'); end;
epos4u Posted November 7, 2016 Posted November 7, 2016 Does your device share its location ? Can you check it with another browser ? I tested successfuly on iphone and Samsung mobile with Android 4.1.2 Also change the UnimButton1Click : procedure TMainmForm.UnimButton1Click(Sender: TObject); begin UniSession.AddJS( 'if (navigator.geolocation) { ' + ' navigator.geolocation.getCurrentPosition( function(position) { ' + ' ajaxRequest(MainmForm.UnimButton1, "CurrentPosition" ,' + ' ["lat=" + position.coords.latitude, ' + ' "lng=" + position.coords.longitude, ' + ' "acc=" + position.coords.accuracy, ' + ' "alt=" + position.coords.altitude, ' + ' "altacc=" + position.coords.altitudeAccuracy, ' + ' "head=" + position.coords.heading, ' + ' "ts=" + position.coords.timestamp ' + ' ]);' + ' })' + '} else {alert("Geolocation is not supported.");}'); end; Hi Lema, ios having problems and chrome on android, used to work before got it working on firefox on android, but not chrome or on iphone 6s or is it just me many thanks Lema
mjcramos Posted June 28, 2017 Posted June 28, 2017 Hello, I was trying to do this implementation here but with the mobile device it is not going at all, why when I test on the computer it works normal, and when it goes to the cell phone, it does not work? 1
asapltda Posted September 27, 2017 Author Posted September 27, 2017 You must use https Hi, thank you for you answer. But could you be a little more explicit and put the correct code? Again, thank you very much
Grupo Datasoft Ltda. Posted August 16, 2018 Posted August 16, 2018 Hi, thank you for you answer. But could you be a little more explicit and put the correct code? Again, thank you very much Hola Carlos, soy Diego Sandoval, lo que tienes que hacer por disposición de Google Maps es que para usar "geolocation functions" debes usar la app de Unigui en https, en http solamente no te va a funcionar en móviles, es decir, a la app debes adicionarle los certificados ssl necesarios y acceder a ella así: https://app.gollatino.com:8077. Esta es una demo que hice hoy para darte un ejemplo, pruébala en tu teléfono móvil con tu android 4.2 y me avisas cómo te fué
mhmda Posted August 16, 2018 Posted August 16, 2018 Hi, when you publish your App at Play store or App store (hybrid app) it is not easy to get work from first, I am fighting for a week for getting location work correctly and also we enable the navigation using Waze or Google maps, I will publish the needed code for Android and swift as soon as I can. 1
Recommended Posts