Add runtime API for setting tile prefetch delta for Source class (#184)
* Add runtime API for setting tile prefetch delta for Source class * Use Integer as param. * Update gl native submodule.
This commit is contained in:
@@ -14,6 +14,7 @@ import com.mapbox.mapboxsdk.testapp.activity.style.GridSourceActivity.ID_GRID_LA
|
||||
import com.mapbox.mapboxsdk.testapp.activity.style.GridSourceActivity.ID_GRID_SOURCE
|
||||
import com.mapbox.mapboxsdk.testapp.utils.TestingAsyncUtils
|
||||
import org.junit.Assert
|
||||
import org.junit.Assert.*
|
||||
import org.junit.Test
|
||||
|
||||
class CustomGeometrySourceTest : BaseTest() {
|
||||
@@ -66,4 +67,20 @@ class CustomGeometrySourceTest : BaseTest() {
|
||||
}.count() == THREAD_POOL_LIMIT)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun sourceZoomDeltaTest() {
|
||||
validateTestSetup()
|
||||
invoke(mapboxMap) { uiController, mapboxMap ->
|
||||
mapboxMap.prefetchZoomDelta = 3
|
||||
mapboxMap.style!!.getSource(ID_GRID_SOURCE)!!.let {
|
||||
assertNull(it.prefetchZoomDelta)
|
||||
it.prefetchZoomDelta = 5
|
||||
assertNotNull(it.prefetchZoomDelta)
|
||||
assertEquals(5, it.prefetchZoomDelta!!)
|
||||
it.prefetchZoomDelta = null
|
||||
assertNull(it.prefetchZoomDelta)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user