-
Notifications
You must be signed in to change notification settings - Fork 123
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
Error when batch forward geocoding a single query #1119
Comments
Are there any updates with this? |
Also seeing this as well with version 5.1.0, exactly as described above. I tried with 4.9.0 and saw the same. |
The Geocoding API only return a list of JSON object IF a batch request is sent, which is defined as a query with at least 1 semicolon in it. The below workaround solves the problem for me. I have appended a semicolon at the end of my query, rendering it a batch request, for which the Geocoding API will return a list of JSON objects as response. Adding a semicolon to the end of the query will make the Geocoding API return a list of JSON objects, which is the expected input for GSON.
|
Thanks for reporting the issue! It'll be fixed in the next SDK release. |
SDK version 5.4.1 with the fix has been released. |
This seems to be similar to this issue on the swift repo: mapbox/MapboxGeocoder.swift#147
When trying to call enqueue batch call on a single query, the response will fail to be deserialized. For example when doing:
The error I get when trying to batch call a single query is the following:
I believe the problem here is that
won't return a list when querying a single element which Gson will fail to deserialize.
It seems a list is only returned when more than one query is sent in
{query}
.Note: this was tried on version 5.0.0
The text was updated successfully, but these errors were encountered: