我想在 google API 路线图上显示 100 多个点.. 我引用此链接显示路线 https://developers.google.com/maps/documentation/roads/inspector但是这个链接不允许我更多感谢 100 个捕捉点来显示路线
最佳答案
根据 API 的概述 overview page说明:
Snap to roads: This service takes up to 100 GPS points collected along a route, and returns a similar set of data with the points snapped to the most likely roads the vehicle was traveling along.
但是,有一些方法可以实现您正在寻找的行为 here .其中指出,对于处理长路径,由于道路捕捉功能限制为每个请求 100 点路径,因此补救措施是产生多个请求,然后:
treat the individual requests as one long path, you should include some overlap, such that the final points from the previous request are included as the first points of the subsequent request. The number of points to include depends on the accuracy of your data
不幸的是,所提供的链接适用于 Google 的 Java 客户端。但是,对于您的应用程序,您可以找到他们的 node.js 示例。 (链接在页面顶部或在他们的 github 页面上)
希望这对您有所帮助!
关于javascript - 关于 google api 我想在 google API 路线图上显示超过 100 个点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42524882/