简体   繁体   English

我们可以从本地Google地图数据中获取导航数据到另一个应用程序吗?

[英]Can we get navigation data from native google maps data into another app?

I have used native google maps in my application just for navigation purpose. 我已在我的应用程序中使用本机google地图只是为了导航。 But i need to get those navigation data (lattitude and longitude) of my route or else is there any other way to get so? 但是我需要获取路线的那些导航数据(经度和纬度),否则还有其他方法可以获取吗?

More than anything else, I would suggest that you please go through Google Maps/Google Earth APIs Terms of Service . 最重要的是,我建议您仔细阅读《 Google Maps / Google Earth APIs服务条款》 There are restrictions given for the Maps API Implementations such as this: 对于Maps API的实现有一些限制,例如:

No navigation. 没有导航。 You will not use the Service or Content for or in connection with (a) real-time navigation or route guidance; 您不会将服务或内容用于(a)实时导航或路线指南; or (b) automatic or autonomous vehicle control. 或(b)自动或自主车辆控制。

Please also note on this: 另请注意:

No use of Content without a Google map. 没有Google地图,不使用内容。 Unless the Maps APIs Documentation expressly permits you to do so, you will not use the Content in a Maps API Implementation without a corresponding Google map. 除非Maps API文档明确允许您这样做,否则在没有相应的Google地图的情况下,您不会在Maps API实现中使用内容。 For example, you may display Street View imagery without a corresponding Google map because the Maps APIs Documentation expressly permits this use. 例如,您可能会显示街景图像而没有相应的Google地图,因为Maps API文档明确允许此用法。

For your question, " is there any other way to get so? " 对于您的问题,“ 还有其他方法可以做到吗?

Supported with documentation, you may want to try using Geolocation: Displaying User or Device Position on Maps . 受文档支持,您可能需要尝试使用Geolocation:在地图上显示用户或设备位置 As shown in the documentation's sample code, this determines the user's location through the W3C navigator.geolocation property. 如文档的示例代码所示,这通过W3C navigator.geolocation属性确定用户的位置。 It may only provide a rough estimate of a user's location but this approach is also considered as the easiest and most fully-supported so it should be prioritized over other geolocation methods. 它可能仅提供用户位置的粗略估计,但是此方法也被认为是最简单且得到最充分支持的方法,因此应优先于其他地理位置方法。

W3C Geolocation standard mentioned about turn-by-turn route navigation in one of its use cases. W3C地理位置标准在其中一种使用案例中提到了转弯路线导航。

Turn-by-turn route navigation 路线导航

A mapping application can help the user navigate along a route by providing detailed turn-by-turn directions. 地图应用程序可通过提供详细的转弯指示来帮助用户沿着路线导航。 The application does this by registering with the Geolocation API to receive repeated location updates of the user's position. 该应用程序通过向Geolocation API注册来执行此操作,以接收用户位置的重复位置更新。 These updates are delivered as soon as the implementing user agent determines that the position of the user has changed, which allows the application to anticipate any changes of direction that the user might need to do. 一旦实现的用户代理确定用户的位置已更改,就将传递这些更新,这使应用程序可以预期用户可能需要进行的方向更改。

Please try going further through the given documentations for more detailed information. 请尝试进一步浏览给定的文档以获取更多详细信息。

Lastly, you may want to try the solutions given in this related SO post and hope it helps too. 最后,您可能想尝试此相关SO文章中给出的解决方案,希望对您有所帮助。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM