Mapbox forward api returns incorrect UK postcode suggestions

  Kiến thức lập trình

I am trying to geocode a UK postcode into latitude, longitude values. The autocomplete suggestions returned underneath are not an exact match, even though an exact match exists. I have reproduced this in the v6 playground so as to ensure this is nothing to do with my implementation. See below:

I then delete a character and type it in again and somehow I get the exact match. ie:

(Link to v6 playground with params here)

The only way I can fix this behaviour is to switch off autocomplete for postcodes but that would be a detriment to the user.

What I would like to happen is that the user would get the suggestions up to when there is an exact match – standard behaviour I’d assume.

Is there a way to get around this issue?

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT