Geocoding ambiguous addresses with google maps API

前端 未结 1 1312
闹比i
闹比i 2021-01-15 19:04

In the past (around January 2015 or so), when I sent an address fragment to the google maps API, I would get back a list of things that matched my address fragment. For exa

相关标签:
1条回答
  • 2021-01-15 19:24

    Places Autocomplete is a much better fit for ambiguous or incomplete addresses. Specially when these come from users typing, see the JavaScript library.

    When using any of these, bear in mind that viewport biasing goes a long way. When using the JavaScript library, it's highly convenient to bind the map (if you have one) to the Autocomplete widget, so that predictions are influenced by the map's viewport all the time:

    autocomplete.bindTo('bounds', map);
    
    0 讨论(0)
提交回复
热议问题