Search in sources :

Example 1 with OsmQuestDownload

use of de.westnordost.streetcomplete.data.osm.download.OsmQuestDownload in project StreetComplete by westnordost.

the class QuestDownload method downloadQuestTypes.

private void downloadQuestTypes(BoundingBox bbox, List<QuestType> questTypes, Set<LatLon> notesPositions) {
    for (QuestType questType : questTypes) {
        if (cancelState.get())
            break;
        if (maxQuestTypes != null && downloadedQuestTypes >= maxQuestTypes)
            break;
        if (questType instanceof OsmElementQuestType) {
            OsmQuestDownload questDownload = questDownloadProvider.get();
            questDownload.setQuestListener(questListener);
            if (questDownload.download((OsmElementQuestType) questType, bbox, notesPositions)) {
                downloadedTilesDao.put(tiles, questType.getClass().getSimpleName());
            }
            downloadedQuestTypes++;
            dispatchProgress();
        }
    }
}
Also used : OsmNoteQuestType(de.westnordost.streetcomplete.data.osmnotes.OsmNoteQuestType) OsmElementQuestType(de.westnordost.streetcomplete.data.osm.OsmElementQuestType) QuestType(de.westnordost.streetcomplete.data.QuestType) OsmElementQuestType(de.westnordost.streetcomplete.data.osm.OsmElementQuestType) OsmQuestDownload(de.westnordost.streetcomplete.data.osm.download.OsmQuestDownload)

Aggregations

QuestType (de.westnordost.streetcomplete.data.QuestType)1 OsmElementQuestType (de.westnordost.streetcomplete.data.osm.OsmElementQuestType)1 OsmQuestDownload (de.westnordost.streetcomplete.data.osm.download.OsmQuestDownload)1 OsmNoteQuestType (de.westnordost.streetcomplete.data.osmnotes.OsmNoteQuestType)1