Getting an intersection with Google Places/Geocoding API

后端 未结 7 1403
野性不改
野性不改 2020-12-29 10:58

I\'m trying to find the two closest streets to a point with the Google Places API (basically to indicate the closest intersection). However, any result will only ever return

相关标签:
7条回答
  • 2020-12-29 12:02

    As discussed, there is no GoogleMap facility to reverse geocode and get a set of close points.

    The only alternative I see is

    • Calculate 200 metres N/S/E/W of the point with Haversine. You'll need to choose '200' empirically
    • Reverse-geocode those 4 points
    • From the returned addresses, take the 2 closest streets that are different (may not succeed)

    If you do this client-side, your users will rarely run into the daily 2'500 limit.

    0 讨论(0)
提交回复
热议问题