检查Google地图中的GPS Lat / Lng点是否在路上 [英] Check if a GPS Lat/Lng point lies on a road in Google maps
问题描述
我正在开发android中的导航应用程序。我想在用户越野时提示用户。所以,如果我有GPS Lat / Lng点,是否有可能确定该点是否在路上?有没有API支持这种检查?这是在一般的道路上完成的,而不是在指定路径/折线的时候完成的。 code> isLocationOnPath()函数。您必须添加依赖关系
依赖关系{
compile'com.google.maps.android:android-maps- utils:0.4+'
}
在您的应用gradle文件中。有关详情,请 http://googlemaps.github.io/android-maps-utils/#开始
I'm developing a navigation app in android. I want to prompt the user when he goes off-road. So, if I have a GPS Lat/Lng point, is it possible to determine if that point lies on a road or not? Is there any API support for such checks? This is to be done on all roads in general and not while having a specified path/polyline.
You can use the isLocationOnPath()
function for that. You have to add the dependency
dependencies {
compile 'com.google.maps.android:android-maps-utils:0.4+'
}
in your app gradle file. For more information http://googlemaps.github.io/android-maps-utils/#start
这篇关于检查Google地图中的GPS Lat / Lng点是否在路上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!