谷歌地图API街坐标

谷歌地图API街坐标

本文介绍了谷歌地图API街坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想提出一个Android应用程序。是否有可能来检查,如果用户(给予一定的坐标)正面临着街道,如果这条街是在10-20ft了?

I am making an android app. Is it possible to check if a user (given some coordinates) is facing a street and if that street is within 10-20ft away?

如果不是,是否有一个开放源码的地图,我可以花纹,通过手动使用code /协调,看是否有附近的街头?我想打一个导航系统,为盲人,我需要一些方法来检查用户是否站在马路中间。

If not, is there an open source map which I can "tread" through manually using code/coordinates to see if there is a nearby "street"? I want to make a navigation system for the blind and I need some way to check if the user is standing on the middle of the street.

谢谢,罗希特

推荐答案

您需要阅读上的谷歌地图API地理编码:

You'll want to read up on the Google Maps Geocoding API:

HTTP://$c$c.google.com/apis /地图/文档/地理编码/

如果你在Android上,有一个特殊的 地理codeR 类,将调用谷歌地图为您提供:

If you're on Android, there's a special Geocoder class that will call Google Maps for you:

Geocoder geocoder = new Geocoder(this, Locale.getDefault());
List<Address> addresses = geocoder.getFromLocation(lat, lng, 1);

(来源:机器人:反向地理编码 - getFromLocation

美中不足的是,这只是去给最有可能的地址为用户的当前位置 - 你没有得到指定模糊因数或类似​​的东西。即便如此,10-20英尺。应该是足够接近此相匹配。

The catch is that this just going to give the most likely address for the user's current location -- you don't get to specify a fuzz factor or anything like that. Even then, 10-20 ft. should be close enough for this to match.

如果这不会得到你所需要的数据,你可能也想看看 OpenStreetMap的,这是一个开放的地图数据库。我没有太多的经验与它自己,但有文档浏览: http://wiki.openstreetmap.org /维基/ Main_Page

If this doesn't get you the data you need, you might also want to look at OpenStreetMap, which is an open maps database. I don't have much experience with it myself, but there's documentation here: http://wiki.openstreetmap.org/wiki/Main_Page

这篇关于谷歌地图API街坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 04:37