doujie4050 2012-04-04 15:35
浏览 22
已采纳

在PHP和MySql中使用HTML5 Geolocation

I'm building a web application for a University project which requires the use of PHP and MySql. I'm planning on using HTML5 Geolocation to ask access to a logged in users location on a form. Once they have accepted and submitted the form I would like the location information to be stored in a MySql database and then recalled on another page in the form of a Google Map with a pin in the area where the form was submitted.

I've had a search around but can't find any conclusive evidence to suggest that this would be a viable way of doing it. So my question is is this (relatively) simple to do and more importantly is it a reliable way of capturing data about a users location?

The idea is that a user would use the application in order to report problems in their area, for example a pothole. A user can log in and report the problem and the location by allowing the use of Geolocation. The problem is then recorded on a 'problem' page, where the council can look and see where it was reported from.

Any tips would be great!

  • 写回答

2条回答 默认 最新

  • dongzhi6382 2012-04-04 15:40
    关注

    Well its accuracy varies greatly. Sometimes it can be pinpointed to a few meters and other times be off a couple of kilometers. This detection is based on networks and trace routing for the most part, and as such you can never guarantee complete accuracy.

    I would recommend using addresses for your project. Google can easily project pins on addresses, plus that's likely what the city will be using internally.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 组策略中的计算机配置策略无法下发
  • ¥15 如何绘制动力学系统的相图
  • ¥15 对接wps接口实现获取元数据
  • ¥20 给自己本科IT专业毕业的妹m找个实习工作
  • ¥15 用友U8:向一个无法连接的网络尝试了一个套接字操作,如何解决?
  • ¥30 我的代码按理说完成了模型的搭建、训练、验证测试等工作(标签-网络|关键词-变化检测)
  • ¥50 mac mini外接显示器 画质字体模糊
  • ¥15 TLS1.2协议通信解密
  • ¥40 图书信息管理系统程序编写
  • ¥20 Qcustomplot缩小曲线形状问题