Adding flexibility to Matrix API builder to set custom max coordinate list size limit #1133
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #1124 by adding support for Matrix API calls with a coordinate list size that's greater than 25.
After approval from the Mapbox team, a Mapbox account can make Matrix API calls with a coordinate list that's larger than the default of 25. This pr unblocks users from using the Java SDK's
MapboxMatrix.builder()to make those 26+ calls.This pr introduces a
.coordinateListSizeLimit()method, which takes anIntegerparameter. The parameter represents the new max number of coordinates per call. If the number passed through is higher than what the Mapbox account is allowed (e.g. passing.coordinateListSizeLimit(50)when 25 is still the max limit for that Mapbox account/token), the backend API response will respond with an error message. However, at least the Matrix API call will now be allowed/made by the Java SDK rather than an exception being thrown before the call is even made.cc @juliawinder @chloekraw @brandihaskins @zugaldia