-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
result event not emitted for a two different results which share the same id #293
Comments
There was a bug in mapbox-gl-geocoder where the So instead a fix was implemented that simply does a precheck to see if the result event being fired is for the same result, and if it is ignore it, a workaround for the underlying issue, but mostly works fine. In this scenario those two addresses are returning the same The Geocoding API documentation at https://docs.mapbox.com/api/search/#geocoding-response-object is not entirely clear if this If this is simply an error in the upstream Mapbox Geocoding API, then we'll need to wait for a fix there. If not and some results may have the same 1 Bay Avenue
{ "id": "address.3291212928152738", "type": "Feature", "place_type": [ "address" ], "relevance": 1, "properties": { "accuracy": "interpolated" }, "text_en-US": "Bay Avenue", "place_name_en-US": "1 Bay Avenue, Welland, Ontario L3B 3G3, Canada", "text": "Bay Avenue", "place_name": "1 Bay Avenue, Welland, Ontario L3B 3G3, Canada", "center": [ -79.246267, 42.949539 ], "geometry": { "type": "Point", "coordinates": [ -79.246267, 42.949539 ], "interpolated": true }, "address": "1", "context": [ { "id": "postcode.4926389830389270", "text_en-US": "L3B 3G3", "text": "L3B 3G3" }, { "id": "place.3630735081406220", "wikidata": "Q424773", "text_en-US": "Welland", "language_en-US": "en", "text": "Welland", "language": "en" }, { "id": "region.7377835739263190", "short_code": "CA-ON", "wikidata": "Q1904", "text_en-US": "Ontario", "language_en-US": "en", "text": "Ontario", "language": "en" }, { "id": "country.4282270149587150", "short_code": "ca", "wikidata": "Q16", "text_en-US": "Canada", "language_en-US": "en", "text": "Canada", "language": "en" } ] } 2 Bay Avenue{ "id": "address.3291212928152738", "type": "Feature", "place_type": [ "address" ], "relevance": 1, "properties": { "accuracy": "interpolated" }, "text_en-US": "Bay Avenue", "place_name_en-US": "2 Bay Avenue, Welland, Ontario L3B 3G3, Canada", "text": "Bay Avenue", "place_name": "2 Bay Avenue, Welland, Ontario L3B 3G3, Canada", "center": [ -79.246271, 42.949492 ], "geometry": { "type": "Point", "coordinates": [ -79.246271, 42.949492 ], "interpolated": true }, "address": "2", "context": [ { "id": "postcode.4926389830389270", "text_en-US": "L3B 3G3", "text": "L3B 3G3" }, { "id": "place.3630735081406220", "wikidata": "Q424773", "text_en-US": "Welland", "language_en-US": "en", "text": "Welland", "language": "en" }, { "id": "region.7377835739263190", "short_code": "CA-ON", "wikidata": "Q1904", "text_en-US": "Ontario", "language_en-US": "en", "text": "Ontario", "language": "en" }, { "id": "country.4282270149587150", "short_code": "ca", "wikidata": "Q16", "text_en-US": "Canada", "language_en-US": "en", "text": "Canada", "language": "en" } ] } |
Going to check in on this one and see if I can find anything on the ID side. |
After some digging, it seems that we shouldn't rely on deduplicating features by ID, particularly for features that are geographically very close to one another. As this is not a data issue, we should find a way to fix this client-side. |
In that case, having some duplicate |
This was fixed in #298 and will be included in the upcoming v4.5.0 release. |
Hi,
The steps to reproduce:
Result
event is called.Result
is not called.Why
Result
is not called in the second step? How to make the event raise on every search?The text was updated successfully, but these errors were encountered: