use of com.mapbox.mapboxsdk.offline.OfflineTilePyramidRegionDefinition in project osm-contributor by jawg.
the class OfflineRegionsActivity method selectOfflineRegion.
private void selectOfflineRegion(int position) {
if (selectedRegionItem != null) {
selectedRegionItem.setSelected(false);
}
selectedRegionItem = adapter.getOfflineRegion(position);
selectedRegionItem.setSelected(true);
OfflineTilePyramidRegionDefinition definition = (OfflineTilePyramidRegionDefinition) selectedRegionItem.getOfflineRegion().getDefinition();
animateCameraToBounds(definition.getBounds());
if (selectedRegionItem.getStatus().isComplete()) {
switchMode(Mode.STATUS_COMPLETE);
} else {
switchMode(Mode.STATUS_INCOMPLETE);
}
closeEditMenu();
adapter.notifyDataSetChanged();
}
Aggregations