[android] add api to enable/disable tile prefetching

This commit is contained in:
Ivo van Dongen
2017-07-18 16:26:24 +02:00
committed by Ivo van Dongen
parent c0dd1103e0
commit c5300ebabf
8 changed files with 128 additions and 1 deletions

View File

@@ -186,5 +186,15 @@ public class MapboxMapOptionsTest {
assertEquals(Color.BLUE, new MapboxMapOptions()
.myLocationBackgroundTintColor(Color.BLUE).getMyLocationBackgroundTintColor());
}
@Test
public void testPrefetchesTiles() {
// Default value
assertTrue(new MapboxMapOptions().getPrefetchesTiles());
// Check mutations
assertTrue(new MapboxMapOptions().setPrefetchesTiles(true).getPrefetchesTiles());
assertFalse(new MapboxMapOptions().setPrefetchesTiles(false).getPrefetchesTiles());
}
}