From f87f95943a9b372747289668b6bf230b7052b538 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 10 Dec 2012 22:15:06 +0100 Subject: [PATCH] Fix errors --- DataExtractionOSM/src/net/osmand/map/RegionRegistry.java | 1 - .../src/net/osmand/plus/download/SrtmIndexItem.java | 8 +++----- OsmAnd/res/values-pl/strings.xml | 1 - .../net/osmand/plus/activities/DownloadIndexActivity.java | 1 + .../net/osmand/plus/download/DownloadIndexListThread.java | 1 + config/site/download.php | 4 +++- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/DataExtractionOSM/src/net/osmand/map/RegionRegistry.java b/DataExtractionOSM/src/net/osmand/map/RegionRegistry.java index 5d49fde0d8..0320fbcfad 100644 --- a/DataExtractionOSM/src/net/osmand/map/RegionRegistry.java +++ b/DataExtractionOSM/src/net/osmand/map/RegionRegistry.java @@ -1,6 +1,5 @@ package net.osmand.map; -import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; diff --git a/DataExtractionOSM/src/net/osmand/plus/download/SrtmIndexItem.java b/DataExtractionOSM/src/net/osmand/plus/download/SrtmIndexItem.java index 56dc766caf..c2d014a617 100644 --- a/DataExtractionOSM/src/net/osmand/plus/download/SrtmIndexItem.java +++ b/DataExtractionOSM/src/net/osmand/plus/download/SrtmIndexItem.java @@ -1,12 +1,10 @@ package net.osmand.plus.download; -import gnu.trove.list.array.TIntArrayList; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Map; -import java.util.Set; import net.osmand.data.IndexConstants; import net.osmand.map.RegionCountry; @@ -25,6 +23,7 @@ public class SrtmIndexItem extends IndexItem { } public void updateExistingTiles(Map existingFileNames) { + tilesToDownload.clear(); for(int i = 0; iWykryto starą wersję pluginu OsMoDroid, która musi zostać zaktualizowana. Plugin OsMoDroid (TODO opis) Ograniczenie prędkości - OsMoDroid Wyświetlanie wysokości - korygowanie przesunięcia start diff --git a/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java b/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java index 76a6f48030..641cb9068d 100644 --- a/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java @@ -306,6 +306,7 @@ public class DownloadIndexActivity extends OsmandExpandableListActivity { Map indexFileNames = getMyApplication().getResourceManager().getIndexFileNames(); for(SrtmIndexItem s : cached){ s.updateExistingTiles(indexFileNames); + filtered.add(s); } } for (IndexItem file : downloadListIndexThread.getCachedIndexFiles()) { diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadIndexListThread.java b/OsmAnd/src/net/osmand/plus/download/DownloadIndexListThread.java index f928107d48..02c4ecc9af 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadIndexListThread.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadIndexListThread.java @@ -49,6 +49,7 @@ public class DownloadIndexListThread extends Thread { public void run() { indexFiles = DownloadOsmandIndexesHelper.getIndexesList(ctx); if(OsmandPlugin.getEnabledPlugin(SRTMPlugin.class) != null){ + cachedSRTMFiles.clear(); Map indexFileNames = new LinkedHashMap(); List countries = RegionRegistry.getRegionRegistry().getCountries(); for(RegionCountry rc : countries){ diff --git a/config/site/download.php b/config/site/download.php index 61dd43a6c4..f3d03d4ef9 100755 --- a/config/site/download.php +++ b/config/site/download.php @@ -115,7 +115,9 @@ function update_count_of_downloads($file) { set_time_limit(0); $xml = simplexml_load_file("indexes.xml"); $res = $xml->xpath('//region[@name="'.$file.'"]'); - if(isset($_GET['road'])){ + if(isset($_GET['srtm'])){ + downloadFile('srtm/'.$file); + } else if(isset($_GET['road'])){ downloadFile('road-indexes/'.$file); } else if (count($res) > 0) { $node = $res[0];