I used appMobi js and it works fine if I reload the site in Safari on the iPhone. However, bookmarked applications on the main screen do not do this (even if I add a new version to the web application).
The new js is loaded into the bookmarked application (I added a pop-up message with a new invitation every time I updated the code to make sure the web application loads the new js), and iPhone promtps me if I want to allow the site to check, but nothing happens when I say yes. If lat / long is displayed in Safari.
Has anyone had a similar problem?
UPDATE: it works, but only the first time you load the page - the second time it displays "start", but does not display lat / long ...
if (navigator.geolocation) { alert('Geolocation is supported!'); } else { alert('Geolocation is not supported for this Browser/OS version yet.'); } try{ //position request alert('start'); navigator.geolocation.getCurrentPosition( function (position) { alert(position.coords.latitude); alert(position.coords.longitude); }); } catch(evt) { alert('fail'+evt.message); }
source share