Closed pozdnyakov closed 4 years ago
/cc @asheemmamoowala do you think that property would be useful for gl-js as well?
@asheemmamoowala do you think that property would be useful for gl-js as well?
@pozdnyakov Is there any documentation around what this method is supposed to do? Tracking for parity at https://github.com/mapbox/mapbox-gl-js/issues/9603, but I don't see any use case for it in GL-JS as yet.
@pozdnyakov Is there any documentation around what this method is supposed to do?
Just in this pr description, and the inline comments in source.hpp
.. However, it's quite simple: it makes sure the update tile network request does not happen more often than the given duration (even if the server-provided expiration date supposes more frequent tile updates)
@pozdnyakov a few follow-up questions:
Source::setMinimumTileUpdateInterval(Duration)
be safely called at any time? cc @mapbox/maps-android @knov to cut tickets for platform bindings. For now, it's only a high priority on Android.
cc @asheemmamoowala
- can
Source::setMinimumTileUpdateInterval(Duration)
be safely called at any time?
yeah
- once a TTL override is set, can the same API call be used to change the override? For example, if a device were on low power mode, you might want to slow down a source's refresh rate even further.
absolutely, the resulting network request interval is always = max(TTL, minimuTileUpdateInterval /* set by the introduced API*/)
thanks for the clarification @pozdnyakov!
The
Source::setMinimumTileUpdateInterval(Duration)
method sets the minimum tile update interval, which is used to throttle the tile update network requests.The corresponding
Source::getMinimumTileUpdateInterval()
getter is added too.Default minimum tile update interval value is
Duration::zero()
.Tag https://github.com/mapbox/mapbox-gl-native-team/issues/335