捕捉到道路 Android
我正在编写一个 Android 应用程序,我需要能够获取纬度/经度值并找到距离它最近的道路的纬度/经度值。我已阅读 http://econym.org.uk/gmap/snap.htm 上的文章,并尝试实现这一点,但我不得不使用 Google Maps Webservices 而不是 javascript(因为它是一个 Android 应用程序)。 这样的请求时,
当我发出像maps.google.com/maps/api/directions/xml?origin=52.0,0&destination=52.0,0&sensor=true
它根本不会返回最近的道路!看来上述方法不适用于网络服务。有没有人对如何解决这个问题有任何其他想法?
I'm writing an Android app and I need the ability to take a lat/long value and find the lat/long value of the nearest road to it. I've read the article at http://econym.org.uk/gmap/snap.htm, and tried to implement this, but I've had to use the Google Maps Webservices rather than javascript (since it's an android app). When I make a request like
maps.google.com/maps/api/directions/xml?origin=52.0,0&destination=52.0,0&sensor=true
it doesn't return me the closest road at all! Seems that the above method doesn't work with the webservices. Has anyone got any other ideas about how to solve this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的网址似乎工作正常。
这是我用来测试它的AsyncTask。
在 logcat 输出中,如果您向下查看几行,您应该会看到:
它们是您要查找的坐标。
我希望这有帮助。
Your URL seems to work perfectly.
Here is the AsyncTask I used to test it.
Within the logcat output if you look down a few lines you should see:
They are the coordinates you are looking for.
I hope this helps.