Baseflow / flutter-geocoding

A Geocoding plugin for Flutter
https://baseflow.com
MIT License
136 stars 71 forks source link

[Question]: Get the timeUntilReset #158

Open starshipcoder opened 1 year ago

starshipcoder commented 1 year ago

Please check the following before submitting a new issue.

Please select for which platform(s) you need help

Your question

Hi

I get this error in my log when too many request

[GEOXPC] Throttled "PlaceRequest.REQUEST_TYPE_GEOCODING" request: Tried to make more than 50 requests in 60 seconds, will reset in 1 seconds - Error Domain=GEOErrorDomain Code=-3 "(null)" UserInfo={details=( { intervalType = short; maxRequests = 50; "throttler.keyPath" = "app:com.starshipcoder.contactonmap/0x20302/short(default/any)"; timeUntilReset = 1; windowSize = 60; } ), requestKindString=PlaceRequest.REQUEST_TYPE_GEOCODING, timeUntilReset=1, requestKind=770}

Is there a way to get the timeUntilRequest ?

Regards

Version

2.0.1

mvanbeusekom commented 1 year ago

Hi @starshipcoder,

Thanks for raising this issue. At the moment it is not possible to access the timeUntilReset parameter. We are however planning to refactor the geocoding plugin exposing the native APIs instead of only a cross-platform abstraction. This should allow us to also expose a more detailed error object on iOS which in turn can expose the timeUntilReset parameter.

This however is not something that we'll release short term. I will leave this issue open so we are able to track progress.