Global location input autocomplete

前端 未结 5 1742
误落风尘
误落风尘 2021-01-20 11:11

I was looking for a plugin to create a smart location form field which has a suggested autocomplete. I was unable to find anything suitable (Google Geocode is too unreliable

5条回答
  •  天涯浪人
    2021-01-20 11:41

    What is your data source of locations? If it is geonames.org, they have different geographies on different servers - with different performance characteristics. Hence it is common on a worldwide search to see jerks, odd responses, etc. as different servers toss back at different times. I found that user selection of a country, and feeding that into the city query pretty much eliminates jerkiness, odd responses, etc. If you are using geonames.org, they require attribution at the search box. If you are using a google data source of names, I can't comment, but you might check how they handle major versus minor countries. Also, think about the level of detail provided. Geonames is remarkable on that score.

提交回复
热议问题