[web2py] Re: Geolocation: how to execute js script (navigator.geolocation, ecc) before controller code?

2018-08-26 Thread Donald McClymont
I have now fixed a few things to avoid some errors and set to require https as IOS/Safari will only render locations under https. For laptops etc the proposed locations are not terribly accurate unless the wifi has been logged or they have GPS chip installed. However that's really a separate

[web2py] Re: Geolocation: how to execute js script (navigator.geolocation, ecc) before controller code?

2018-08-25 Thread 黄祥
cool, thx 4 sharing https://www.netdecisionmaking.com/w2p_location_widget/location/index return error tested on phone n notebook https://www.netdecisionmaking.com/w2p_location_widget/location/new_location laptop always return a wrong coordinates and address mobile return a wrong coordinates and

[web2py] Re: Geolocation: how to execute js script (navigator.geolocation, ecc) before controller code?

2018-08-25 Thread Donald McClymont
I have now tweaked this geolocation widget to allow loading of an API key from appconfig.ini and also amended to use json from standard library. The version of widget files are at https://github.com/DonaldMcC/w2p_location_widget and there is a demo of the above code

[web2py] Re: Geolocation: how to execute js script (navigator.geolocation, ecc) before controller code?

2018-06-18 Thread Fabio Ceccarani
Thanks Donald, I will look itseem very interesting. Fabio Il giorno domenica 17 giugno 2018 23:02:08 UTC+2, Donald McClymont ha scritto: > > You could have a look at this - > https://github.com/DonaldMcC/gdms/blob/master/views/default/user.html > > It integrates a javascript geolocation

[web2py] Re: Geolocation: how to execute js script (navigator.geolocation, ecc) before controller code?

2018-06-17 Thread Donald McClymont
You could have a look at this - https://github.com/DonaldMcC/gdms/blob/master/views/default/user.html It integrates a javascript geolocation plugin to web2py user registration and also Leonel Camara's excellent plugin_location_picker which together allowed me to do everything I was wanting to

[web2py] Re: Geolocation: how to execute js script (navigator.geolocation, ecc) before controller code?

2018-06-17 Thread Fabio Ceccarani
Hi Dave! I will try your solution. I had not thought to using this metod. Thanks! Fabio Il giorno venerdì 15 giugno 2018 22:12:26 UTC+2, Dave S ha scritto: > > > > On Friday, June 15, 2018 at 6:35:48 AM UTC-7, Fabio Ceccarani wrote: >> >> Ih all, >> >> my site do do these operation: >> >> >>

[web2py] Re: Geolocation: how to execute js script (navigator.geolocation, ecc) before controller code?

2018-06-15 Thread Dave S
On Friday, June 15, 2018 at 6:35:48 AM UTC-7, Fabio Ceccarani wrote: > > Ih all, > > my site do do these operation: > > > 1. geolocalize user in view using html5 navigator.geolocation (classic js > code) > > > 2. past latitude and longitude to controller with: >

[web2py] Re: Geolocation

2012-11-01 Thread Jacinto Parga
I think I have a silly misunderstood with jQuery.post I'm trying to store the latitude and longitude in a db.events table. I haven't found the right way to do this simple thing, This is my view: {{left_sidebar_enabled,right_sidebar_enabled=False,True}} {{extend 'layout.html'}} h3View

[web2py] Re: Geolocation

2012-10-26 Thread Jacinto Parga
Sorry, I didn't get it. Could you please write the controller? Thanks El domingo, 21 de octubre de 2012 00:52:24 UTC+2, Massimo Di Pierro escribió: You can try something like jQuery.post({'url':'{{=URL('youraction')}}','data':'a='+position.coords.latitude + b +

[web2py] Re: Geolocation

2012-10-20 Thread Massimo Di Pierro
You can try something like jQuery.post({'url':'{{=URL('youraction')}}','data':'a='+position.coords.latitude + b + position.coords.longitude)}); On Saturday, 20 October 2012 17:42:15 UTC-5, Michael Gheith wrote: Hello web2py community! I have a question: I know how to get the user's

[web2py] Re: Geolocation

2012-10-20 Thread Michael Gheith
Awesome. Thank you so much Massimo! On Saturday, October 20, 2012 5:52:24 PM UTC-5, Massimo Di Pierro wrote: You can try something like jQuery.post({'url':'{{=URL('youraction')}}','data':'a='+position.coords.latitude + b + position.coords.longitude)}); On Saturday, 20 October 2012