[android] - remove style loaded listener

This commit is contained in:
Tobrun
2018-11-08 14:11:12 +01:00
committed by Tobrun
parent d68dfe0551
commit 470bc66f0f
7 changed files with 26 additions and 85 deletions

View File

@@ -15,7 +15,7 @@ import com.mapbox.mapboxsdk.style.layers.Property
import com.mapbox.mapboxsdk.style.sources.GeoJsonSource
fun MapboxMap.querySourceFeatures(sourceId: String): List<Feature> {
return this.getSourceAs<GeoJsonSource>(sourceId)?.querySourceFeatures(null) ?: emptyList()
return this.style.getSourceAs<GeoJsonSource>(sourceId)?.querySourceFeatures(null) ?: emptyList()
}
fun MapboxMap.queryRenderedFeatures(location: Location, layerId: String): List<Feature> {
@@ -25,7 +25,7 @@ fun MapboxMap.queryRenderedFeatures(location: Location, layerId: String): List<F
}
fun MapboxMap.isLayerVisible(layerId: String): Boolean {
return this.getLayer(layerId)?.visibility?.value?.equals(Property.VISIBLE)!!
return this.style.getLayer(layerId)?.visibility?.value?.equals(Property.VISIBLE)!!
}
fun MapboxMap.waitForSource(uiController: UiController, sourceId: String) {