[英]Is it possible for a web-based application to somehow access a smartphone's location ? And report back?
My web application is built in Flask (DIY web framework for Python) and I would like to include my user's location on a map with our other assets. 我的Web应用程序是在Flask(Python的DIY Web框架)中构建的,我想将用户在地图上的位置以及其他资产也包括在内。
I have not built applications on either android or iPhone. 我尚未在Android或iPhone上构建应用程序。 I am unclear as to the scope of this task. 我不清楚这项任务的范围。
stack: CentOS6
, Python
, Flask
, Twilio
, and anything the user's browser is capable of (?) 堆栈: CentOS6
, Python
, Flask
, Twilio
以及用户浏览器能够执行的所有操作(?)
Yes, with HTML5 comes the Geolocation API . 是的,HTML5附带了Geolocation API 。
if ("geolocation" in navigator) {
navigator.geolocation.getCurrentPosition(function(position) {
do_something(position.coords.latitude, position.coords.longitude);
});
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.