简体   繁体   English

如何从Android中的Google Map获取2点之间的点(经度和纬度)?

[英]How to get the points( Latitude and Longitude) between 2 points from google map in android?

I am working in android studio , and the user will select 2 end points on the map, How can I get the points between these 2 end points? 我在android studio中工作,用户将在地图上选择2个端点,如何获得这2个端点之间的点? so I can compare some points i have with these points?? 所以我可以将我的一些要点与这些要点进行比较?

Also another Q. : I will save the location of the user,if I have points How to know the closest point to the user? 还有一个问:如果我有点,我将保存用户的位置如何知道最接近用户的点?

Thank you. 谢谢。

Here is a complete answer of your problem.Google provide an Directions api for finding way points between two geo location see here . 这是您问题的完整答案。Google提供了Directions api,用于查找两个地理位置之间的路标(请参见此处)

Go through this link. 通过链接。 it has complete example with source code. 它有完整的示例和源代码。

Hope you will get solution to your problem. 希望您能解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从json文件获取经度和纬度并将点插入到Google Map-Android - Get latitude and longitude from json file and insert points to google map - Android 如何在android studio中的谷歌地图上获取选定位置的纬度和经度 - How to get latitude and longitude of select location on google map in android studio 如何在Android中获取谷歌地图蓝点的经度和纬度 - how to get the google map blue point latitude and longitude in android 如何在经纬度两点之间推进X距离(米)? - How to advance X distance (meters) between two points of latitude and longitude? 如何在JAVA / Android中找到2个给定纬度+经度点之间的直线倾斜度? - How to find the incline of straight line between 2 given points of latitude+longitude in JAVA/Android? 如何从谷歌地图 URL 获取纬度经度 - How to get latitude longitude from google map URL 在两点之间生成固定的纬度和经度 - generate fixed no of latitude and longitude between two points 如何从给定点(经度,纬度)计算给定半径内的所有点(经度,纬度)? - how to calculate all points(longitude,latitude) within a given radius from given point (longitude,latitude)? 如何从地图中的标记获取纬度和经度 - How to get latitude and longitude from a mark in the map 如何将经度和纬度转换为点并使用绘制多边形中的点 - How to convert Longitude and Latitude to points and using the points in drawing a polygon
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM