Compare commits
56 commits
Author | SHA1 | Date | |
---|---|---|---|
|
ece96a1b18 | ||
|
04b738c236 | ||
|
9db293dbc3 | ||
|
e666da21b1 | ||
|
0e3d3c9104 | ||
|
7b43ee0832 | ||
|
95f8644db6 | ||
|
044fc666db | ||
|
f355bd5779 | ||
|
eff51518ce | ||
|
24a7543840 | ||
|
4f108b05ae | ||
|
5bb338dc8c | ||
|
eb1a94c4f6 | ||
|
01ad603c4d | ||
|
040d116852 | ||
|
6ba1768018 | ||
|
32f4f47e79 | ||
|
cd6801f554 | ||
|
293899d58f | ||
|
7c2745d4c1 | ||
|
f40cc08002 | ||
|
ef643006b9 | ||
|
583f58f480 | ||
|
dd601c6b72 | ||
|
864607feda | ||
|
1a4a686387 | ||
|
842cd7a1cb | ||
|
5aa59c8913 | ||
|
ee7b5baca1 | ||
|
49bb5558ad | ||
|
1e886dd70f | ||
|
98ca8486ca | ||
|
35efe0daa8 | ||
|
18664a153a | ||
|
12eed80d9e | ||
|
ec16c91f1e | ||
|
9f3c0f9de2 | ||
|
a935ff6ea4 | ||
|
f6090ff64a | ||
|
354bebde18 | ||
|
630c5016ac | ||
|
b45e62de7a | ||
|
282adfce7c | ||
|
9ab60c08d8 | ||
|
d6103b4633 | ||
|
7f199aae48 | ||
|
4e80bf1728 | ||
|
accba7899f | ||
|
2e0a3fe7aa | ||
|
7056eeb65d | ||
|
156f21d058 | ||
|
61a7510ac5 | ||
|
33eb95caaa | ||
|
f52c305403 | ||
|
dcfb6fe3b8 |
648 changed files with 41036 additions and 8506 deletions
|
@ -4,6 +4,7 @@ package net.osmand.binary;
|
||||||
import gnu.trove.list.array.TIntArrayList;
|
import gnu.trove.list.array.TIntArrayList;
|
||||||
import gnu.trove.map.TIntObjectMap;
|
import gnu.trove.map.TIntObjectMap;
|
||||||
import gnu.trove.map.hash.TIntObjectHashMap;
|
import gnu.trove.map.hash.TIntObjectHashMap;
|
||||||
|
import gnu.trove.map.hash.TLongObjectHashMap;
|
||||||
import gnu.trove.set.hash.TIntHashSet;
|
import gnu.trove.set.hash.TIntHashSet;
|
||||||
|
|
||||||
import java.io.BufferedInputStream;
|
import java.io.BufferedInputStream;
|
||||||
|
@ -288,6 +289,18 @@ public class BinaryMapIndexReader {
|
||||||
return routingIndexes.size() > 0;
|
return routingIndexes.size() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean containsRouteData(int left31x, int top31y, int right31x, int bottom31y, int zoom) {
|
||||||
|
for (RouteRegion ri : routingIndexes) {
|
||||||
|
List<RouteSubregion> sr = ri.getSubregions();
|
||||||
|
for (RouteSubregion r : sr) {
|
||||||
|
if (right31x >= r.left && left31x <= r.right && r.top <= bottom31y && r.bottom >= top31y) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean containsPoiData(double latitude, double longitude) {
|
public boolean containsPoiData(double latitude, double longitude) {
|
||||||
for (PoiRegion index : poiIndexes) {
|
for (PoiRegion index : poiIndexes) {
|
||||||
if (index.rightLongitude >= longitude && index.leftLongitude <= longitude &&
|
if (index.rightLongitude >= longitude && index.leftLongitude <= longitude &&
|
||||||
|
@ -536,7 +549,7 @@ public class BinaryMapIndexReader {
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new IllegalArgumentException(name);
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<City> getCities(String region, SearchRequest<City> resultMatcher,
|
public List<City> getCities(String region, SearchRequest<City> resultMatcher,
|
||||||
|
@ -547,6 +560,9 @@ public class BinaryMapIndexReader {
|
||||||
int cityType) throws IOException {
|
int cityType) throws IOException {
|
||||||
List<City> cities = new ArrayList<City>();
|
List<City> cities = new ArrayList<City>();
|
||||||
AddressRegion r = getRegionByName(region);
|
AddressRegion r = getRegionByName(region);
|
||||||
|
if(r == null) {
|
||||||
|
return cities;
|
||||||
|
}
|
||||||
for(CitiesBlock block : r.cities) {
|
for(CitiesBlock block : r.cities) {
|
||||||
if(block.type == cityType) {
|
if(block.type == cityType) {
|
||||||
codedIS.seek(block.filePointer);
|
codedIS.seek(block.filePointer);
|
||||||
|
@ -1416,7 +1432,7 @@ public class BinaryMapIndexReader {
|
||||||
SearchPoiTypeFilter poiTypeFilter, ResultMatcher<Amenity> resultMatcher) {
|
SearchPoiTypeFilter poiTypeFilter, ResultMatcher<Amenity> resultMatcher) {
|
||||||
SearchRequest<Amenity> request = new SearchRequest<Amenity>();
|
SearchRequest<Amenity> request = new SearchRequest<Amenity>();
|
||||||
float coeff = (float) (radius / MapUtils.getTileDistanceWidth(SearchRequest.ZOOM_TO_SEARCH_POI));
|
float coeff = (float) (radius / MapUtils.getTileDistanceWidth(SearchRequest.ZOOM_TO_SEARCH_POI));
|
||||||
TIntObjectHashMap<List<Location>> zooms = new TIntObjectHashMap<List<Location>>();
|
TLongObjectHashMap<List<Location>> zooms = new TLongObjectHashMap<List<Location>>();
|
||||||
for(int i = 1; i < route.size(); i++) {
|
for(int i = 1; i < route.size(); i++) {
|
||||||
Location cr = route.get(i);
|
Location cr = route.get(i);
|
||||||
Location pr = route.get(i - 1);
|
Location pr = route.get(i - 1);
|
||||||
|
@ -1430,7 +1446,7 @@ public class BinaryMapIndexReader {
|
||||||
double bottomRightY = Math.max(ty, py) + coeff;
|
double bottomRightY = Math.max(ty, py) + coeff;
|
||||||
for(int x = (int) topLeftX; x <= bottomRightX; x++) {
|
for(int x = (int) topLeftX; x <= bottomRightX; x++) {
|
||||||
for(int y = (int) topLeftY; y <= bottomRightY; y++) {
|
for(int y = (int) topLeftY; y <= bottomRightY; y++) {
|
||||||
int hash = (x << SearchRequest.ZOOM_TO_SEARCH_POI) + y;
|
long hash = (((long)x) << SearchRequest.ZOOM_TO_SEARCH_POI) + y;
|
||||||
if(!zooms.containsKey(hash)) {
|
if(!zooms.containsKey(hash)) {
|
||||||
zooms.put(hash, new LinkedList<Location>());
|
zooms.put(hash, new LinkedList<Location>());
|
||||||
}
|
}
|
||||||
|
@ -1441,14 +1457,14 @@ public class BinaryMapIndexReader {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
int sleft = 0, sright = Integer.MAX_VALUE, stop = 0, sbottom = Integer.MAX_VALUE;
|
int sleft = Integer.MAX_VALUE , sright = 0, stop = Integer.MAX_VALUE, sbottom = 0;
|
||||||
for(int vl : zooms.keys()) {
|
for(long vl : zooms.keys()) {
|
||||||
int x = (vl >> SearchRequest.ZOOM_TO_SEARCH_POI) << (31 - SearchRequest.ZOOM_TO_SEARCH_POI);
|
long x = (vl >> SearchRequest.ZOOM_TO_SEARCH_POI) << (31 - SearchRequest.ZOOM_TO_SEARCH_POI);
|
||||||
int y = (vl & ((1 << SearchRequest.ZOOM_TO_SEARCH_POI) -1)) << (31 - SearchRequest.ZOOM_TO_SEARCH_POI);
|
long y = (vl & ((1 << SearchRequest.ZOOM_TO_SEARCH_POI) -1)) << (31 - SearchRequest.ZOOM_TO_SEARCH_POI);
|
||||||
sleft = Math.min(x, sleft);
|
sleft = (int) Math.min(x, sleft);
|
||||||
stop = Math.min(y, stop);
|
stop = (int) Math.min(y, stop);
|
||||||
sbottom = Math.max(y, sbottom);
|
sbottom = (int) Math.max(y, sbottom);
|
||||||
sright = Math.max(x, sright);
|
sright = (int) Math.max(x, sright);
|
||||||
}
|
}
|
||||||
request.radius = radius;
|
request.radius = radius;
|
||||||
request.left = sleft;
|
request.left = sleft;
|
||||||
|
@ -1598,7 +1614,7 @@ public class BinaryMapIndexReader {
|
||||||
|
|
||||||
// search on the path
|
// search on the path
|
||||||
// stores tile of 16 index and pairs (even length always) of points intersecting tile
|
// stores tile of 16 index and pairs (even length always) of points intersecting tile
|
||||||
TIntObjectHashMap<List<Location>> tiles = null;
|
TLongObjectHashMap<List<Location>> tiles = null;
|
||||||
double radius = -1;
|
double radius = -1;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1628,9 +1644,9 @@ public class BinaryMapIndexReader {
|
||||||
protected SearchRequest(){
|
protected SearchRequest(){
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTileHashOnPath(double lat, double lon) {
|
public long getTileHashOnPath(double lat, double lon) {
|
||||||
int x = (int) MapUtils.getTileNumberX(SearchRequest.ZOOM_TO_SEARCH_POI, lon);
|
long x = (int) MapUtils.getTileNumberX(SearchRequest.ZOOM_TO_SEARCH_POI, lon);
|
||||||
int y = (int) MapUtils.getTileNumberY(SearchRequest.ZOOM_TO_SEARCH_POI, lat);
|
long y = (int) MapUtils.getTileNumberY(SearchRequest.ZOOM_TO_SEARCH_POI, lat);
|
||||||
return (x << SearchRequest.ZOOM_TO_SEARCH_POI) | y;
|
return (x << SearchRequest.ZOOM_TO_SEARCH_POI) | y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1937,6 +1953,7 @@ public class BinaryMapIndexReader {
|
||||||
private static boolean testMapSearch = false;
|
private static boolean testMapSearch = false;
|
||||||
private static boolean testAddressSearch = false;
|
private static boolean testAddressSearch = false;
|
||||||
private static boolean testPoiSearch = false;
|
private static boolean testPoiSearch = false;
|
||||||
|
private static boolean testPoiSearchOnPath = true;
|
||||||
private static boolean testTransportSearch = false;
|
private static boolean testTransportSearch = false;
|
||||||
private static int sleft = MapUtils.get31TileNumberX(6.3);
|
private static int sleft = MapUtils.get31TileNumberX(6.3);
|
||||||
private static int sright = MapUtils.get31TileNumberX(6.5);
|
private static int sright = MapUtils.get31TileNumberX(6.5);
|
||||||
|
@ -1949,7 +1966,7 @@ public class BinaryMapIndexReader {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws IOException {
|
public static void main(String[] args) throws IOException {
|
||||||
RandomAccessFile raf = new RandomAccessFile("", "r");
|
RandomAccessFile raf = new RandomAccessFile("/Users/victorshcherb/osmand/maps/Netherlands_europe_2.obf", "r");
|
||||||
|
|
||||||
BinaryMapIndexReader reader = new BinaryMapIndexReader(raf);
|
BinaryMapIndexReader reader = new BinaryMapIndexReader(raf);
|
||||||
println("VERSION " + reader.getVersion()); //$NON-NLS-1$
|
println("VERSION " + reader.getVersion()); //$NON-NLS-1$
|
||||||
|
@ -1966,12 +1983,16 @@ public class BinaryMapIndexReader {
|
||||||
testTransportSearch(reader);
|
testTransportSearch(reader);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (testPoiSearch) {
|
if (testPoiSearch || testPoiSearchOnPath) {
|
||||||
PoiRegion poiRegion = reader.getPoiIndexes().get(0);
|
PoiRegion poiRegion = reader.getPoiIndexes().get(0);
|
||||||
|
if(testPoiSearch) {
|
||||||
testPoiSearch(reader, poiRegion);
|
testPoiSearch(reader, poiRegion);
|
||||||
testPoiSearchByName(reader);
|
testPoiSearchByName(reader);
|
||||||
|
}
|
||||||
|
if(testPoiSearchOnPath) {
|
||||||
testSearchOnthePath(reader);
|
testSearchOnthePath(reader);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
println("MEMORY " + (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory())); //$NON-NLS-1$
|
println("MEMORY " + (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory())); //$NON-NLS-1$
|
||||||
println("Time " + (System.currentTimeMillis() - time)); //$NON-NLS-1$
|
println("Time " + (System.currentTimeMillis() - time)); //$NON-NLS-1$
|
||||||
|
@ -1983,7 +2004,7 @@ public class BinaryMapIndexReader {
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
println("Searching poi on the path...");
|
println("Searching poi on the path...");
|
||||||
final List<Location> locations = readGPX(new File(
|
final List<Location> locations = readGPX(new File(
|
||||||
""));
|
"/Users/victorshcherb/osmand/maps/2015-03-07_19-07_Sat.gpx"));
|
||||||
SearchRequest<Amenity> req = buildSearchPoiRequest(locations, radius, new SearchPoiTypeFilter() {
|
SearchRequest<Amenity> req = buildSearchPoiRequest(locations, radius, new SearchPoiTypeFilter() {
|
||||||
@Override
|
@Override
|
||||||
public boolean accept(PoiCategory type, String subcategory) {
|
public boolean accept(PoiCategory type, String subcategory) {
|
||||||
|
|
|
@ -21,11 +21,9 @@ import net.osmand.binary.BinaryMapIndexReader.SearchRequest;
|
||||||
import net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData;
|
import net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData;
|
||||||
import net.osmand.data.Amenity;
|
import net.osmand.data.Amenity;
|
||||||
import net.osmand.data.Amenity.AmenityRoutePoint;
|
import net.osmand.data.Amenity.AmenityRoutePoint;
|
||||||
import net.osmand.data.AmenityType;
|
|
||||||
import net.osmand.data.LatLon;
|
import net.osmand.data.LatLon;
|
||||||
import net.osmand.osm.MapPoiTypes;
|
import net.osmand.osm.MapPoiTypes;
|
||||||
import net.osmand.osm.PoiCategory;
|
import net.osmand.osm.PoiCategory;
|
||||||
import net.osmand.osm.PoiType;
|
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
import net.osmand.util.MapUtils;
|
import net.osmand.util.MapUtils;
|
||||||
import net.sf.junidecode.Junidecode;
|
import net.sf.junidecode.Junidecode;
|
||||||
|
@ -40,6 +38,7 @@ public class BinaryMapPoiReaderAdapter {
|
||||||
|
|
||||||
public static final int SHIFT_BITS_CATEGORY = 7;
|
public static final int SHIFT_BITS_CATEGORY = 7;
|
||||||
private static final int CATEGORY_MASK = (1 << SHIFT_BITS_CATEGORY) - 1 ;
|
private static final int CATEGORY_MASK = (1 << SHIFT_BITS_CATEGORY) - 1 ;
|
||||||
|
private static final int ZOOM_TO_SKIP_FILTER_READ = 6;
|
||||||
private static final int ZOOM_TO_SKIP_FILTER = 3;
|
private static final int ZOOM_TO_SKIP_FILTER = 3;
|
||||||
private static final int BUCKET_SEARCH_BY_NAME = 5;
|
private static final int BUCKET_SEARCH_BY_NAME = 5;
|
||||||
|
|
||||||
|
@ -324,7 +323,7 @@ public class BinaryMapPoiReaderAdapter {
|
||||||
|
|
||||||
|
|
||||||
LOG.info("Searched poi structure in "+(System.currentTimeMillis() - time) +
|
LOG.info("Searched poi structure in "+(System.currentTimeMillis() - time) +
|
||||||
"ms. Found " + offKeys.length +" subtress");
|
"ms. Found " + offKeys.length +" subtrees");
|
||||||
for (int j = 0; j < offKeys.length; j++) {
|
for (int j = 0; j < offKeys.length; j++) {
|
||||||
codedIS.seek(offKeys[j] + indexOffset);
|
codedIS.seek(offKeys[j] + indexOffset);
|
||||||
int len = readInt();
|
int len = readInt();
|
||||||
|
@ -451,10 +450,8 @@ public class BinaryMapPoiReaderAdapter {
|
||||||
int indexOffset = codedIS.getTotalBytesRead();
|
int indexOffset = codedIS.getTotalBytesRead();
|
||||||
long time = System.currentTimeMillis();
|
long time = System.currentTimeMillis();
|
||||||
TLongHashSet skipTiles = null;
|
TLongHashSet skipTiles = null;
|
||||||
int zoomToSkip = 31;
|
|
||||||
if(req.zoom != -1){
|
if(req.zoom != -1){
|
||||||
skipTiles = new TLongHashSet();
|
skipTiles = new TLongHashSet();
|
||||||
zoomToSkip = req.zoom + ZOOM_TO_SKIP_FILTER;
|
|
||||||
}
|
}
|
||||||
int length ;
|
int length ;
|
||||||
int oldLimit ;
|
int oldLimit ;
|
||||||
|
@ -481,13 +478,27 @@ public class BinaryMapPoiReaderAdapter {
|
||||||
if(skipTiles != null){
|
if(skipTiles != null){
|
||||||
skipTiles.clear();
|
skipTiles.clear();
|
||||||
}
|
}
|
||||||
LOG.info("Searched poi structure in "+(System.currentTimeMillis() - time) +
|
LOG.info("Searched poi structure in " + (System.currentTimeMillis() - time) + " ms. Found "
|
||||||
"ms. Found " + offsets.length +" subtress");
|
+ offsets.length + " subtrees");
|
||||||
for (int j = 0; j < offsets.length; j++) {
|
for (int j = 0; j < offsets.length; j++) {
|
||||||
|
long skipVal = offsetsMap.get(offsets[j]);
|
||||||
|
if (skipTiles != null && skipVal != -1) {
|
||||||
|
int dzoom = ZOOM_TO_SKIP_FILTER_READ - ZOOM_TO_SKIP_FILTER;
|
||||||
|
long dx = (skipVal >> ZOOM_TO_SKIP_FILTER_READ);
|
||||||
|
long dy = skipVal - (dx << ZOOM_TO_SKIP_FILTER_READ);
|
||||||
|
skipVal = ((dx >> dzoom) << ZOOM_TO_SKIP_FILTER) | (dy >> dzoom);
|
||||||
|
if (skipVal != -1 && skipTiles.contains(skipVal)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
codedIS.seek(offsets[j] + indexOffset);
|
codedIS.seek(offsets[j] + indexOffset);
|
||||||
int len = readInt();
|
int len = readInt();
|
||||||
int oldLim = codedIS.pushLimit(len);
|
int oldLim = codedIS.pushLimit(len);
|
||||||
readPoiData(left31, right31, top31, bottom31, req, region, skipTiles, zoomToSkip);
|
boolean read = readPoiData(left31, right31, top31, bottom31, req, region, skipTiles,
|
||||||
|
req.zoom == -1 ? 31 : req.zoom + ZOOM_TO_SKIP_FILTER );
|
||||||
|
if(read && skipVal != -1 && skipTiles != null) {
|
||||||
|
skipTiles.add(skipVal);
|
||||||
|
}
|
||||||
codedIS.popLimit(oldLim);
|
codedIS.popLimit(oldLim);
|
||||||
if(req.isCancelled()){
|
if(req.isCancelled()){
|
||||||
return;
|
return;
|
||||||
|
@ -542,20 +553,21 @@ public class BinaryMapPoiReaderAdapter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void readPoiData(int left31, int right31, int top31, int bottom31,
|
private boolean readPoiData(int left31, int right31, int top31, int bottom31,
|
||||||
SearchRequest<Amenity> req, PoiRegion region, TLongHashSet toSkip, int zSkip) throws IOException {
|
SearchRequest<Amenity> req, PoiRegion region, TLongHashSet toSkip, int zSkip) throws IOException {
|
||||||
int x = 0;
|
int x = 0;
|
||||||
int y = 0;
|
int y = 0;
|
||||||
int zoom = 0;
|
int zoom = 0;
|
||||||
|
boolean read = false;
|
||||||
while(true){
|
while(true){
|
||||||
if(req.isCancelled()){
|
if(req.isCancelled()){
|
||||||
return;
|
return read;
|
||||||
}
|
}
|
||||||
int t = codedIS.readTag();
|
int t = codedIS.readTag();
|
||||||
int tag = WireFormat.getTagFieldNumber(t);
|
int tag = WireFormat.getTagFieldNumber(t);
|
||||||
switch (tag) {
|
switch (tag) {
|
||||||
case 0:
|
case 0:
|
||||||
return;
|
return read;
|
||||||
case OsmandOdb.OsmAndPoiBoxData.X_FIELD_NUMBER :
|
case OsmandOdb.OsmAndPoiBoxData.X_FIELD_NUMBER :
|
||||||
x = codedIS.readUInt32();
|
x = codedIS.readUInt32();
|
||||||
break;
|
break;
|
||||||
|
@ -574,19 +586,21 @@ public class BinaryMapPoiReaderAdapter {
|
||||||
if (toSkip != null) {
|
if (toSkip != null) {
|
||||||
int xp = (int) MapUtils.getTileNumberX(zSkip, am.getLocation().getLongitude());
|
int xp = (int) MapUtils.getTileNumberX(zSkip, am.getLocation().getLongitude());
|
||||||
int yp = (int) MapUtils.getTileNumberY(zSkip, am.getLocation().getLatitude());
|
int yp = (int) MapUtils.getTileNumberY(zSkip, am.getLocation().getLatitude());
|
||||||
long val = (((long) xp) << zSkip) | yp;
|
long valSkip = (((long) xp) << zSkip) | yp;
|
||||||
if (!toSkip.contains(val)) {
|
if (!toSkip.contains(valSkip)) {
|
||||||
boolean publish = req.publish(am);
|
boolean publish = req.publish(am);
|
||||||
if(publish) {
|
if(publish) {
|
||||||
toSkip.add(val);
|
read = true;
|
||||||
|
toSkip.add(valSkip);
|
||||||
}
|
}
|
||||||
}
|
} else if(zSkip <= zoom){
|
||||||
if(zSkip <= zoom){
|
|
||||||
codedIS.skipRawBytes(codedIS.getBytesUntilLimit());
|
codedIS.skipRawBytes(codedIS.getBytesUntilLimit());
|
||||||
return;
|
return read;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
req.publish(am);
|
if(req.publish(am)) {
|
||||||
|
read = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -788,9 +802,10 @@ public class BinaryMapPoiReaderAdapter {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean readBoxField(int left31, int right31, int top31, int bottom31,
|
private boolean readBoxField(int left31, int right31, int top31, int bottom31,
|
||||||
int px, int py, int pzoom, TIntLongHashMap offsetsMap, TLongHashSet skipTiles, SearchRequest<Amenity> req, PoiRegion region) throws IOException {
|
int px, int py, int pzoom, TIntLongHashMap offsetsMap, TLongHashSet skipTiles,
|
||||||
|
SearchRequest<Amenity> req, PoiRegion region) throws IOException {
|
||||||
req.numberOfReadSubtrees++;
|
req.numberOfReadSubtrees++;
|
||||||
int zoomToSkip = req.zoom + ZOOM_TO_SKIP_FILTER;
|
int zoomToSkip = req.zoom == -1 ? 31 : req.zoom + ZOOM_TO_SKIP_FILTER_READ;
|
||||||
boolean checkBox = true;
|
boolean checkBox = true;
|
||||||
boolean existsCategories = false;
|
boolean existsCategories = false;
|
||||||
int zoom = pzoom;
|
int zoom = pzoom;
|
||||||
|
@ -863,20 +878,21 @@ public class BinaryMapPoiReaderAdapter {
|
||||||
case OsmandOdb.OsmAndPoiBox.SHIFTTODATA_FIELD_NUMBER: {
|
case OsmandOdb.OsmAndPoiBox.SHIFTTODATA_FIELD_NUMBER: {
|
||||||
int x = dx + (px << (zoom - pzoom));
|
int x = dx + (px << (zoom - pzoom));
|
||||||
int y = dy + (py << (zoom - pzoom));
|
int y = dy + (py << (zoom - pzoom));
|
||||||
long l = ((((x << zoom) | y) << 5) | zoom);
|
|
||||||
boolean read = true;
|
boolean read = true;
|
||||||
if(req.tiles != null) {
|
if(req.tiles != null) {
|
||||||
int zx = x << (SearchRequest.ZOOM_TO_SEARCH_POI - zoom);
|
long zx = x << (SearchRequest.ZOOM_TO_SEARCH_POI - zoom);
|
||||||
int zy = y << (SearchRequest.ZOOM_TO_SEARCH_POI - zoom);
|
long zy = y << (SearchRequest.ZOOM_TO_SEARCH_POI - zoom);
|
||||||
read = req.tiles.contains((zx << SearchRequest.ZOOM_TO_SEARCH_POI) + zy);
|
read = req.tiles.contains((zx << SearchRequest.ZOOM_TO_SEARCH_POI) + zy);
|
||||||
}
|
}
|
||||||
int offset = readInt();
|
int offset = readInt();
|
||||||
if (read) {
|
if (read) {
|
||||||
offsetsMap.put(offset, l);
|
|
||||||
if (skipTiles != null && zoom >= zoomToSkip) {
|
if (skipTiles != null && zoom >= zoomToSkip) {
|
||||||
long val = ((((long) x) >> (zoom - zoomToSkip)) << zoomToSkip)
|
long valSkip = ((((long) x) >> (zoom - zoomToSkip)) << zoomToSkip)
|
||||||
| (((long) y) >> (zoom - zoomToSkip));
|
| (((long) y) >> (zoom - zoomToSkip));
|
||||||
skipTiles.add(val);
|
offsetsMap.put(offset, valSkip);
|
||||||
|
skipTiles.add(valSkip);
|
||||||
|
} else {
|
||||||
|
offsetsMap.put(offset, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
|
|
@ -126,7 +126,7 @@ public class MapPoiTypes {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, PoiType> getAllTranslatedNames() {
|
public Map<String, PoiType> getAllTranslatedNames(boolean onlyTranslation) {
|
||||||
Map<String, PoiType> translation = new TreeMap<String, PoiType>();
|
Map<String, PoiType> translation = new TreeMap<String, PoiType>();
|
||||||
for(PoiCategory pc : categories) {
|
for(PoiCategory pc : categories) {
|
||||||
for(PoiType pt : pc.getPoiTypes()) {
|
for(PoiType pt : pc.getPoiTypes()) {
|
||||||
|
@ -134,6 +134,12 @@ public class MapPoiTypes {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
translation.put(pt.getTranslation(), pt);
|
translation.put(pt.getTranslation(), pt);
|
||||||
|
if(!onlyTranslation) {
|
||||||
|
String kn = pt.getKeyName().replace('_', ' ');
|
||||||
|
if(!pt.getTranslation().toLowerCase().contains(kn)) {
|
||||||
|
translation.put(Algorithms.capitalizeFirstLetterAndLowercase(kn), pt);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return translation;
|
return translation;
|
||||||
|
@ -169,8 +175,10 @@ public class MapPoiTypes {
|
||||||
for (PoiType pt : pc.getPoiTypes()) {
|
for (PoiType pt : pc.getPoiTypes()) {
|
||||||
translation.put(pt.getTranslation(), pt);
|
translation.put(pt.getTranslation(), pt);
|
||||||
if (!onlyTranslation) {
|
if (!onlyTranslation) {
|
||||||
// translation.put(pt.getKeyName(), pt);
|
String kn = pt.getKeyName().replace('_', ' ');
|
||||||
translation.put(Algorithms.capitalizeFirstLetterAndLowercase(pt.getKeyName().replace('_', ' ')), pt);
|
if(!pt.getTranslation().toLowerCase().contains(kn)) {
|
||||||
|
translation.put(Algorithms.capitalizeFirstLetterAndLowercase(kn), pt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return translation;
|
return translation;
|
||||||
|
|
|
@ -334,7 +334,7 @@ public class RoutePlannerFrontEnd {
|
||||||
runRecalculation = rlist.size() > 0;
|
runRecalculation = rlist.size() > 0;
|
||||||
if (rlist.size() > 0) {
|
if (rlist.size() > 0) {
|
||||||
RouteSegment previous = null;
|
RouteSegment previous = null;
|
||||||
for (int i = 0; i < rlist.size() - 1; i++) {
|
for (int i = 0; i <= rlist.size() - 1; i++) {
|
||||||
RouteSegmentResult rr = rlist.get(i);
|
RouteSegmentResult rr = rlist.get(i);
|
||||||
RouteSegment segment = new RouteSegment(rr.getObject(), rr.getEndPointIndex());
|
RouteSegment segment = new RouteSegment(rr.getObject(), rr.getEndPointIndex());
|
||||||
if (previous != null) {
|
if (previous != null) {
|
||||||
|
|
|
@ -1,7 +1,43 @@
|
||||||
h3 { text-align: center}
|
|
||||||
h4 { text-align: center}
|
body{padding:0; margin:0; }
|
||||||
div {border-width: 1px; padding: 10px;
|
a {color:#536DFE;}
|
||||||
border: groove; margin-left:auto;margin-right:auto; }
|
xmp{white-space: pre-wrap;}
|
||||||
li { text-align:justify;"}
|
.main{ margin:0 auto; font-family:arial; font-size:11pt;}
|
||||||
img { max-width: 75%; width: auto; height: auto; }
|
.main{width:95%;}
|
||||||
p.img {text-align: center}
|
xmp{max-width:95%;}
|
||||||
|
.code{font-style:italic;}
|
||||||
|
|
||||||
|
.list li{padding-bottom:10px; color:#000; }
|
||||||
|
.list li a{ text-decoration:none;}
|
||||||
|
.subtitle{border-bottom:1px solid #F3F3F3; font-size:13pt; margin-top:10px; font-weight:bold;}
|
||||||
|
.blocksubtitle{font-weight:bold; margin-top:10px;}
|
||||||
|
h1{background-color:#FF8F00; font-size:15pt; color:#fff; padding-left:15px; padding-top:30px; padding-bottom:15px; font-weight:bold;
|
||||||
|
-webkit-border-radius: 4px;-moz-border-radius: 4px;border-radius: 4px; margin-top:-5px;}
|
||||||
|
.content{padding:15px; padding-top:5px;}
|
||||||
|
.content ul{padding-left:20px;}
|
||||||
|
/************home page*****************/
|
||||||
|
.mainlist{list-style-type: none; margin:0; padding:0;}
|
||||||
|
.mainlist li{border-bottom: 1px solid #F3F3F3; padding:15px; }
|
||||||
|
.mainlist li.last{border-bottom:none;}
|
||||||
|
h1.sub{background-color:#536DFE; margin-top:0;}
|
||||||
|
h1.sub small{display:block; font-weight:normal; color:#ACB9FF; margin-top:5px;}
|
||||||
|
|
||||||
|
/*****features**********************/
|
||||||
|
.featuretitle{border-bottom:1px solid #F3F3F3; font-size:14pt; margin-top:10px; font-weight:bold;}
|
||||||
|
.features li{padding-bottom:10px;}
|
||||||
|
/*************frequently asked questions**************/
|
||||||
|
.toc .list li{color:#D2D2D2;}
|
||||||
|
.toc .subtitle{font-weight:normal;}
|
||||||
|
|
||||||
|
.screenshot{max-width:95%; max-height:100%; padding:7px; border:1px solid #ddd;}
|
||||||
|
.imgcontainer{margin:20px 30px;}
|
||||||
|
.legendcontainer{margin:0;}
|
||||||
|
.legend{width:100%;}
|
||||||
|
/*div {border-width: 1px; padding: 10px;
|
||||||
|
border: groove; margin-left:auto;margin-right:auto; width:480pt}
|
||||||
|
h3.help { text-align: center}
|
||||||
|
h4.help { text-align: center}
|
||||||
|
li.help { text-align:justify}
|
||||||
|
img.help { width:auto; height:auto; max-width: 50%;}
|
||||||
|
p.img {text-align: center}*/
|
||||||
|
|
||||||
|
|
|
@ -141,9 +141,11 @@ android {
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
debug {
|
debug {
|
||||||
|
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
|
||||||
signingConfig signingConfigs.development
|
signingConfig signingConfigs.development
|
||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
|
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
|
||||||
signingConfig signingConfigs.publishing
|
signingConfig signingConfigs.publishing
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -276,6 +278,12 @@ tasks.withType(JavaCompile) {
|
||||||
compileTask -> compileTask.dependsOn << [collectExternalResources, buildOsmAndCore, cleanupDuplicatesInCore]
|
compileTask -> compileTask.dependsOn << [collectExternalResources, buildOsmAndCore, cleanupDuplicatesInCore]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clean.dependsOn 'cleanNoTranslate'
|
||||||
|
|
||||||
|
task cleanNoTranslate() {
|
||||||
|
delete ('res/values/no_translate.xml')
|
||||||
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
ivy {
|
ivy {
|
||||||
name = "OsmAndBinariesIvy"
|
name = "OsmAndBinariesIvy"
|
||||||
|
@ -288,6 +296,7 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
compile project(":eclipse-compile:appcompat")
|
||||||
compile project(path: ":OsmAnd-java", configuration: "android")
|
compile project(path: ":OsmAnd-java", configuration: "android")
|
||||||
compile fileTree(
|
compile fileTree(
|
||||||
dir: "libs",
|
dir: "libs",
|
||||||
|
@ -298,9 +307,6 @@ dependencies {
|
||||||
"android-support*.jar",
|
"android-support*.jar",
|
||||||
"OsmAndCore_android.jar",
|
"OsmAndCore_android.jar",
|
||||||
"OsmAndCore_wrapper.jar"])
|
"OsmAndCore_wrapper.jar"])
|
||||||
compile "com.github.ksoichiro:android-observablescrollview:1.5.0"
|
|
||||||
compile "com.android.support:appcompat-v7:21.0.3"
|
|
||||||
compile "com.github.shell-software:fab:1.0.5"
|
|
||||||
legacyCompile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@jar"
|
legacyCompile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@jar"
|
||||||
qtcoredebugCompile "net.osmand:OsmAndCore_androidNativeDebug:0.1-SNAPSHOT@aar"
|
qtcoredebugCompile "net.osmand:OsmAndCore_androidNativeDebug:0.1-SNAPSHOT@aar"
|
||||||
qtcoredebugCompile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar"
|
qtcoredebugCompile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar"
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,20 +1,35 @@
|
||||||
# To enable ProGuard in your project, edit project.properties
|
|
||||||
# to define the proguard.config property as described in that file.
|
|
||||||
#
|
|
||||||
# Add project specific ProGuard rules here.
|
|
||||||
# By default, the flags in this file are appended to flags specified
|
|
||||||
# in ${sdk.dir}/tools/proguard/proguard-android.txt
|
|
||||||
# You can edit the include path and order by changing the ProGuard
|
|
||||||
# include property in project.properties.
|
|
||||||
#
|
|
||||||
# For more details, see
|
|
||||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
||||||
|
|
||||||
# Add any project specific keep options here:
|
|
||||||
|
|
||||||
# If your project uses WebView with JS, uncomment the following
|
# If your project uses WebView with JS, uncomment the following
|
||||||
# and specify the fully qualified class name to the JavaScript interface
|
# and specify the fully qualified class name to the JavaScript interface
|
||||||
# class:
|
# class:
|
||||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||||
# public *;
|
# public *;
|
||||||
#}
|
#}
|
||||||
|
# Allow obfuscation of android.support.v7.internal.view.menu.**
|
||||||
|
# to avoid problem on Samsung 4.2.2 devices with appcompat v21
|
||||||
|
# see https://code.google.com/p/android/issues/detail?id=78377
|
||||||
|
-dontoptimize
|
||||||
|
-keep class !android.support.v7.internal.view.menu.**,android.support.** {*;}
|
||||||
|
-keep class net.osmand.** { *; }
|
||||||
|
-keep interface net.osmand.** { *; }
|
||||||
|
|
||||||
|
-keep class com.** { *; }
|
||||||
|
-keep interface com.** { *; }
|
||||||
|
|
||||||
|
-keep class net.** { *; }
|
||||||
|
-keep interface net.** { *; }
|
||||||
|
|
||||||
|
-keep class gnu.** { *; }
|
||||||
|
-keep interface gnu.** { *; }
|
||||||
|
|
||||||
|
-keep class org.** { *; }
|
||||||
|
-keep interface org.** { *; }
|
||||||
|
|
||||||
|
-keep class bsh.** { *; }
|
||||||
|
-keep interface bsh.** { *; }
|
||||||
|
|
||||||
|
-keep class btools.** { *; }
|
||||||
|
-keep interface btools.** { *; }
|
||||||
|
|
||||||
|
-keep class alice.** { *; }
|
||||||
|
-keep interface alice.** { *; }
|
||||||
|
-dontwarn alice.**
|
|
@ -13,6 +13,3 @@ split.density=false
|
||||||
target=android-21
|
target=android-21
|
||||||
dex.force.jumbo=true
|
dex.force.jumbo=true
|
||||||
android.library.reference.1=../eclipse-compile/appcompat
|
android.library.reference.1=../eclipse-compile/appcompat
|
||||||
android.library.reference.2=../eclipse-compile/observable
|
|
||||||
android.library.reference.2=../eclipse-compile/observable
|
|
||||||
android.library.reference.3=../eclipse-compile/fab
|
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="@dimen/default_sub_text_size"
|
android:textSize="@dimen/default_sub_text_size"
|
||||||
|
android:textColor="@color/color_ok"
|
||||||
tools:text="@string/lorem_ipsum"
|
tools:text="@string/lorem_ipsum"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:maxLines="1"/>
|
android:maxLines="1"/>
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
android:id="@+id/LatitudeEdit"
|
android:id="@+id/LatitudeEdit"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
android:layout_marginRight="5dp"
|
android:layout_marginRight="5dp"
|
||||||
android:inputType="phone"></EditText>
|
android:inputType="numberSigned|numberDecimal|time"></EditText>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
|
||||||
<TableRow android:layout_width="fill_parent" android:id="@+id/lon_row">
|
<TableRow android:layout_width="fill_parent" android:id="@+id/lon_row">
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
android:id="@+id/LongitudeEdit"
|
android:id="@+id/LongitudeEdit"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
android:layout_marginRight="5dp"
|
android:layout_marginRight="5dp"
|
||||||
android:inputType="phone"></EditText>
|
android:inputType="numberSigned|numberDecimal|time"></EditText>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
<TableRow android:layout_width="fill_parent" android:id="@+id/northing_row">
|
<TableRow android:layout_width="fill_parent" android:id="@+id/northing_row">
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
android:id="@+id/NorthingEdit"
|
android:id="@+id/NorthingEdit"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
android:layout_marginRight="5dp"
|
android:layout_marginRight="5dp"
|
||||||
android:inputType="phone"></EditText>
|
android:inputType="numberSigned|numberDecimal|time"></EditText>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
|
||||||
<TableRow android:layout_width="fill_parent" android:id="@+id/easting_row">
|
<TableRow android:layout_width="fill_parent" android:id="@+id/easting_row">
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
android:id="@+id/EastingEdit"
|
android:id="@+id/EastingEdit"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
android:layout_marginRight="5dp"
|
android:layout_marginRight="5dp"
|
||||||
android:inputType="phone"></EditText>
|
android:inputType="numberSigned|numberDecimal|time"></EditText>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
|
||||||
<TableRow android:layout_width="fill_parent" android:id="@+id/zone_row">
|
<TableRow android:layout_width="fill_parent" android:id="@+id/zone_row">
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/osmo_grop_name_length_alert"
|
android:text="@string/osmo_grop_name_length_alert"
|
||||||
android:textColor="@color/fab_material_red_500"/>
|
android:textColor="@color/osmbug_closed"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -18,7 +18,8 @@
|
||||||
android:id="@+id/spinner_nav"
|
android:id="@+id/spinner_nav"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"/>
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:popupBackground="?attr/spinnerListBackground"/>
|
||||||
|
|
||||||
<ProgressBar android:id="@+id/ProgressBar"
|
<ProgressBar android:id="@+id/ProgressBar"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
|
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@android:id/text1"
|
android:id="@android:id/text1"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:background="?attr/expandable_list_background"
|
android:textColor="?attr/spinnerItemTextColor"
|
||||||
android:textSize="@dimen/default_list_text_size"
|
android:textSize="@dimen/default_list_text_size"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
|
@ -151,7 +151,7 @@
|
||||||
<string name="poi_subway_station">Станцыя мэтро</string>
|
<string name="poi_subway_station">Станцыя мэтро</string>
|
||||||
<string name="poi_taxi">Стаянка таксі</string>
|
<string name="poi_taxi">Стаянка таксі</string>
|
||||||
|
|
||||||
<string name="poi_airport">Аэрапорт</string>
|
<string name="poi_aerodrome">Аэрапорт</string>
|
||||||
<string name="poi_helipad">Шрубалётная пляцоўка</string>
|
<string name="poi_helipad">Шрубалётная пляцоўка</string>
|
||||||
<string name="poi_runway">Узлётная паласа</string>
|
<string name="poi_runway">Узлётная паласа</string>
|
||||||
<string name="poi_aeroway_terminal">Тэрмінал аэрапорту</string>
|
<string name="poi_aeroway_terminal">Тэрмінал аэрапорту</string>
|
||||||
|
@ -192,7 +192,7 @@
|
||||||
<string name="poi_waterway_turning_point">Паваротная кропка на вадзе</string>
|
<string name="poi_waterway_turning_point">Паваротная кропка на вадзе</string>
|
||||||
<string name="poi_weir">Невялікая плаціна</string>
|
<string name="poi_weir">Невялікая плаціна</string>
|
||||||
<string name="poi_dam">Дамба</string>
|
<string name="poi_dam">Дамба</string>
|
||||||
<string name="poi_water_mill">Вадзяны млын</string>
|
<string name="poi_watermill">Вадзяны млын</string>
|
||||||
|
|
||||||
<string name="poi_power_substation">Падстанцыя</string>
|
<string name="poi_power_substation">Падстанцыя</string>
|
||||||
<string name="poi_power_transformer">Трансфарматар</string>
|
<string name="poi_power_transformer">Трансфарматар</string>
|
||||||
|
@ -285,7 +285,7 @@
|
||||||
<string name="poi_lawyer">Юрыдычныя паслугі</string>
|
<string name="poi_lawyer">Юрыдычныя паслугі</string>
|
||||||
<string name="poi_office_telecommunication">Тэлекамунікацыйная кампанія</string>
|
<string name="poi_office_telecommunication">Тэлекамунікацыйная кампанія</string>
|
||||||
<string name="poi_ngo">Грамадзкая арганізацыя</string>
|
<string name="poi_ngo">Грамадзкая арганізацыя</string>
|
||||||
<string name="poi_town_hall">Адміністрацыя населенага пункта</string>
|
<string name="poi_townhall">Адміністрацыя населенага пункта</string>
|
||||||
<string name="poi_employment_agency">Біржа працы</string>
|
<string name="poi_employment_agency">Біржа працы</string>
|
||||||
<string name="poi_research">Дасьледчы цэнтар</string>
|
<string name="poi_research">Дасьледчы цэнтар</string>
|
||||||
<string name="poi_it">Інфармацыйныя тэхналёгіі</string>
|
<string name="poi_it">Інфармацыйныя тэхналёгіі</string>
|
||||||
|
|
|
@ -127,7 +127,7 @@
|
||||||
<string name="poi_subway_station">Estació de metro</string>
|
<string name="poi_subway_station">Estació de metro</string>
|
||||||
<string name="poi_taxi">Parada de taxis</string>
|
<string name="poi_taxi">Parada de taxis</string>
|
||||||
|
|
||||||
<string name="poi_airport">Aeroport</string>
|
<string name="poi_aerodrome">Aeroport</string>
|
||||||
<string name="poi_helipad">Heliport</string>
|
<string name="poi_helipad">Heliport</string>
|
||||||
<string name="poi_runway">Pista d\'aterratge</string>
|
<string name="poi_runway">Pista d\'aterratge</string>
|
||||||
<string name="poi_aeroway_terminal">Terminal d\'aeroport</string>
|
<string name="poi_aeroway_terminal">Terminal d\'aeroport</string>
|
||||||
|
@ -163,7 +163,7 @@
|
||||||
<string name="poi_lock_gate">Resclosa</string>
|
<string name="poi_lock_gate">Resclosa</string>
|
||||||
<string name="poi_weir">Sobreeixidor</string>
|
<string name="poi_weir">Sobreeixidor</string>
|
||||||
<string name="poi_dam">Presa d\'aigua</string>
|
<string name="poi_dam">Presa d\'aigua</string>
|
||||||
<string name="poi_water_mill">Molí hidràulic</string>
|
<string name="poi_watermill">Molí hidràulic</string>
|
||||||
|
|
||||||
<string name="poi_power_substation">Subestació elèctrica</string>
|
<string name="poi_power_substation">Subestació elèctrica</string>
|
||||||
<string name="poi_power_transformer">Transformador elèctric</string>
|
<string name="poi_power_transformer">Transformador elèctric</string>
|
||||||
|
@ -249,7 +249,7 @@
|
||||||
<string name="poi_lawyer">Gabinet d\'advocats</string>
|
<string name="poi_lawyer">Gabinet d\'advocats</string>
|
||||||
<string name="poi_office_telecommunication">Empresa de telecomunicacions</string>
|
<string name="poi_office_telecommunication">Empresa de telecomunicacions</string>
|
||||||
<string name="poi_ngo">ONG</string>
|
<string name="poi_ngo">ONG</string>
|
||||||
<string name="poi_town_hall">Ajuntament</string>
|
<string name="poi_townhall">Ajuntament</string>
|
||||||
<string name="poi_employment_agency">Oficina d\'ocupació</string>
|
<string name="poi_employment_agency">Oficina d\'ocupació</string>
|
||||||
<string name="poi_research">Oficina de recerca i desenvolupament</string>
|
<string name="poi_research">Oficina de recerca i desenvolupament</string>
|
||||||
<string name="poi_it">Consultoria en TIC</string>
|
<string name="poi_it">Consultoria en TIC</string>
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
<string name="poi_bus_stop">Zastávka autobusu</string>
|
<string name="poi_bus_stop">Zastávka autobusu</string>
|
||||||
<string name="poi_public_transport_platform_tram">Tramvajová zastávka</string>
|
<string name="poi_public_transport_platform_tram">Tramvajová zastávka</string>
|
||||||
<string name="poi_public_transport_station">Zastávka veřejné dopravy</string>
|
<string name="poi_public_transport_station">Zastávka veřejné dopravy</string>
|
||||||
<string name="poi_airport">Letiště</string>
|
<string name="poi_aerodrome">Letiště</string>
|
||||||
<string name="poi_lighthouse">Maják</string>
|
<string name="poi_lighthouse">Maják</string>
|
||||||
|
|
||||||
<string name="poi_bicycle_rental">Půjčovna kol</string>
|
<string name="poi_bicycle_rental">Půjčovna kol</string>
|
||||||
|
@ -393,7 +393,7 @@
|
||||||
<string name="poi_waterway_turning_point">Vodní obratiště</string>
|
<string name="poi_waterway_turning_point">Vodní obratiště</string>
|
||||||
<string name="poi_weir">Hráz</string>
|
<string name="poi_weir">Hráz</string>
|
||||||
<string name="poi_dam">Přehrada</string>
|
<string name="poi_dam">Přehrada</string>
|
||||||
<string name="poi_water_mill">Vodní mlýn</string>
|
<string name="poi_watermill">Vodní mlýn</string>
|
||||||
|
|
||||||
<string name="poi_power_substation">Transformátorová stanice</string>
|
<string name="poi_power_substation">Transformátorová stanice</string>
|
||||||
<string name="poi_power_transformer">Transformátor</string>
|
<string name="poi_power_transformer">Transformátor</string>
|
||||||
|
@ -482,7 +482,7 @@
|
||||||
<string name="poi_estate_agent">Realitní kancelář</string>
|
<string name="poi_estate_agent">Realitní kancelář</string>
|
||||||
<string name="poi_office_telecommunication">Telekomunikace</string>
|
<string name="poi_office_telecommunication">Telekomunikace</string>
|
||||||
<string name="poi_ngo">Nezisková organizace</string>
|
<string name="poi_ngo">Nezisková organizace</string>
|
||||||
<string name="poi_town_hall">Radnice</string>
|
<string name="poi_townhall">Radnice</string>
|
||||||
<string name="poi_employment_agency">Úřad práce</string>
|
<string name="poi_employment_agency">Úřad práce</string>
|
||||||
<string name="poi_research">Výzkumný ústav</string>
|
<string name="poi_research">Výzkumný ústav</string>
|
||||||
<string name="poi_it">Informační technologie</string>
|
<string name="poi_it">Informační technologie</string>
|
||||||
|
|
|
@ -146,7 +146,7 @@
|
||||||
<string name="poi_subway_station">Metrostation</string>
|
<string name="poi_subway_station">Metrostation</string>
|
||||||
<string name="poi_taxi">Taxaholdeplads</string>
|
<string name="poi_taxi">Taxaholdeplads</string>
|
||||||
|
|
||||||
<string name="poi_airport">Lufthavn</string>
|
<string name="poi_aerodrome">Lufthavn</string>
|
||||||
<string name="poi_helipad">Helikopterlandingsplads</string>
|
<string name="poi_helipad">Helikopterlandingsplads</string>
|
||||||
<string name="poi_runway">Landingsbane</string>
|
<string name="poi_runway">Landingsbane</string>
|
||||||
<string name="poi_aeroway_terminal">Lufthavnsterminal</string>
|
<string name="poi_aeroway_terminal">Lufthavnsterminal</string>
|
||||||
|
@ -188,7 +188,7 @@
|
||||||
<string name="poi_waterway_turning_point">Vendepunkt på vandet</string>
|
<string name="poi_waterway_turning_point">Vendepunkt på vandet</string>
|
||||||
<string name="poi_weir">Stemmeværk</string>
|
<string name="poi_weir">Stemmeværk</string>
|
||||||
<string name="poi_dam">Dæmning</string>
|
<string name="poi_dam">Dæmning</string>
|
||||||
<string name="poi_water_mill">Vandmølle</string>
|
<string name="poi_watermill">Vandmølle</string>
|
||||||
|
|
||||||
<string name="poi_power_substation">Transformerstation</string>
|
<string name="poi_power_substation">Transformerstation</string>
|
||||||
<string name="poi_power_transformer">Transformator</string>
|
<string name="poi_power_transformer">Transformator</string>
|
||||||
|
@ -257,7 +257,7 @@
|
||||||
<string name="poi_lawyer">Advokat</string>
|
<string name="poi_lawyer">Advokat</string>
|
||||||
<string name="poi_office_telecommunication">Telekommunikation selskab</string>
|
<string name="poi_office_telecommunication">Telekommunikation selskab</string>
|
||||||
<string name="poi_ngo">NGO</string>
|
<string name="poi_ngo">NGO</string>
|
||||||
<string name="poi_town_hall">Rådhus</string>
|
<string name="poi_townhall">Rådhus</string>
|
||||||
<string name="poi_employment_agency">Arbejdsformidling</string>
|
<string name="poi_employment_agency">Arbejdsformidling</string>
|
||||||
<string name="poi_research">Forskning</string>
|
<string name="poi_research">Forskning</string>
|
||||||
<string name="poi_it">IT kontor</string>
|
<string name="poi_it">IT kontor</string>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<string name="poi_aeroway_gate">Flughafengate</string>
|
<string name="poi_aeroway_gate">Flughafengate</string>
|
||||||
<string name="poi_aeroway_terminal">Flughafenterminal</string>
|
<string name="poi_aeroway_terminal">Flughafenterminal</string>
|
||||||
<string name="poi_craft_agricultural_engines">Landmaschinen</string>
|
<string name="poi_craft_agricultural_engines">Landmaschinen</string>
|
||||||
<string name="poi_airport">Flughafen</string>
|
<string name="poi_aerodrome">Flughafen</string>
|
||||||
<string name="poi_alcohol">Spirituosenladen</string>
|
<string name="poi_alcohol">Spirituosenladen</string>
|
||||||
<string name="poi_alpine_hut">Berghütte</string>
|
<string name="poi_alpine_hut">Berghütte</string>
|
||||||
<string name="poi_ambulance_station">Rettungswache</string>
|
<string name="poi_ambulance_station">Rettungswache</string>
|
||||||
|
@ -538,7 +538,7 @@
|
||||||
<string name="poi_toll_booth">Mautstelle</string>
|
<string name="poi_toll_booth">Mautstelle</string>
|
||||||
<string name="poi_information">Fremdenverkehrsamt</string>
|
<string name="poi_information">Fremdenverkehrsamt</string>
|
||||||
<string name="poi_town">Kleinstadt</string>
|
<string name="poi_town">Kleinstadt</string>
|
||||||
<string name="poi_town_hall">Rathaus</string>
|
<string name="poi_townhall">Rathaus</string>
|
||||||
<string name="poi_toys">Spielwarenhandlung</string>
|
<string name="poi_toys">Spielwarenhandlung</string>
|
||||||
<string name="poi_trade">Geschäftszentrum</string>
|
<string name="poi_trade">Geschäftszentrum</string>
|
||||||
<string name="poi_traffic_calming_bump">Bodenwelle</string>
|
<string name="poi_traffic_calming_bump">Bodenwelle</string>
|
||||||
|
@ -571,7 +571,7 @@
|
||||||
<string name="poi_waste_disposal">Deponie</string>
|
<string name="poi_waste_disposal">Deponie</string>
|
||||||
<string name="poi_wastewater_plant">Abwasseranlage</string>
|
<string name="poi_wastewater_plant">Abwasseranlage</string>
|
||||||
<string name="poi_craft_watchmaker">Uhrmacher</string>
|
<string name="poi_craft_watchmaker">Uhrmacher</string>
|
||||||
<string name="poi_water_mill">Wassermühle</string>
|
<string name="poi_watermill">Wassermühle</string>
|
||||||
<string name="poi_water_park">Wasserpark</string>
|
<string name="poi_water_park">Wasserpark</string>
|
||||||
<string name="poi_water_tower">Wasserturm</string>
|
<string name="poi_water_tower">Wasserturm</string>
|
||||||
<string name="poi_water_well">Wasserbrunnen</string>
|
<string name="poi_water_well">Wasserbrunnen</string>
|
||||||
|
|
|
@ -145,7 +145,7 @@
|
||||||
<string name="poi_halt">Parada de tren</string>
|
<string name="poi_halt">Parada de tren</string>
|
||||||
<string name="poi_railway_subway_entrance">Entrada de metro</string>
|
<string name="poi_railway_subway_entrance">Entrada de metro</string>
|
||||||
<string name="poi_subway_station">Estación de metro</string>
|
<string name="poi_subway_station">Estación de metro</string>
|
||||||
<string name="poi_airport">Aeropuerto</string>
|
<string name="poi_aerodrome">Aeropuerto</string>
|
||||||
<string name="poi_helipad">Helipuerto</string>
|
<string name="poi_helipad">Helipuerto</string>
|
||||||
<string name="poi_taxi">Parada de taxi</string>
|
<string name="poi_taxi">Parada de taxi</string>
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@
|
||||||
<string name="poi_company">Empresa</string>
|
<string name="poi_company">Empresa</string>
|
||||||
<string name="poi_estate_agent">Inmobiliaria</string>
|
<string name="poi_estate_agent">Inmobiliaria</string>
|
||||||
<string name="poi_lawyer">Abogado</string>
|
<string name="poi_lawyer">Abogado</string>
|
||||||
<string name="poi_town_hall">Municipio</string>
|
<string name="poi_townhall">Municipio</string>
|
||||||
<string name="poi_employment_agency">Oficina de empleo</string>
|
<string name="poi_employment_agency">Oficina de empleo</string>
|
||||||
<string name="poi_studio">Estudio</string>
|
<string name="poi_studio">Estudio</string>
|
||||||
<string name="poi_stadium">Estadio</string>
|
<string name="poi_stadium">Estadio</string>
|
||||||
|
@ -471,7 +471,7 @@
|
||||||
<string name="poi_waterway_turning_point">Punto de giro fluvial</string>
|
<string name="poi_waterway_turning_point">Punto de giro fluvial</string>
|
||||||
<string name="poi_weir">Aliviadero</string>
|
<string name="poi_weir">Aliviadero</string>
|
||||||
<string name="poi_dam">Presa</string>
|
<string name="poi_dam">Presa</string>
|
||||||
<string name="poi_water_mill">Molino de agua</string>
|
<string name="poi_watermill">Molino de agua</string>
|
||||||
|
|
||||||
<string name="poi_telephone_exchange">Central telefónica</string>
|
<string name="poi_telephone_exchange">Central telefónica</string>
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,7 @@
|
||||||
<string name="poi_subway_station">ایستگاه مترو</string>
|
<string name="poi_subway_station">ایستگاه مترو</string>
|
||||||
<string name="poi_taxi">ایستگاه تاکسی</string>
|
<string name="poi_taxi">ایستگاه تاکسی</string>
|
||||||
|
|
||||||
<string name="poi_airport">فرودگاه</string>
|
<string name="poi_aerodrome">فرودگاه</string>
|
||||||
<string name="poi_helipad">جایگاه هلیکوپتر</string>
|
<string name="poi_helipad">جایگاه هلیکوپتر</string>
|
||||||
<string name="poi_runway">باند فرودگاه</string>
|
<string name="poi_runway">باند فرودگاه</string>
|
||||||
<string name="poi_aeroway_terminal">ترمینال Aeroway</string>
|
<string name="poi_aeroway_terminal">ترمینال Aeroway</string>
|
||||||
|
@ -194,7 +194,7 @@
|
||||||
<string name="poi_waterway_turning_point">نقطه گردش آب</string>
|
<string name="poi_waterway_turning_point">نقطه گردش آب</string>
|
||||||
<string name="poi_weir">خاکریز</string>
|
<string name="poi_weir">خاکریز</string>
|
||||||
<string name="poi_dam">سد</string>
|
<string name="poi_dam">سد</string>
|
||||||
<string name="poi_water_mill">اسیاب</string>
|
<string name="poi_watermill">اسیاب</string>
|
||||||
|
|
||||||
<string name="poi_power_substation">ایستگاه فرعی</string>
|
<string name="poi_power_substation">ایستگاه فرعی</string>
|
||||||
<string name="poi_power_transformer">ترانسفورماتور</string>
|
<string name="poi_power_transformer">ترانسفورماتور</string>
|
||||||
|
@ -289,7 +289,7 @@
|
||||||
<string name="poi_lawyer">دفتر وکالت</string>
|
<string name="poi_lawyer">دفتر وکالت</string>
|
||||||
<string name="poi_office_telecommunication">دفتر مخابراتی</string>
|
<string name="poi_office_telecommunication">دفتر مخابراتی</string>
|
||||||
<string name="poi_ngo">NGO</string>
|
<string name="poi_ngo">NGO</string>
|
||||||
<string name="poi_town_hall">شهرداری</string>
|
<string name="poi_townhall">شهرداری</string>
|
||||||
<string name="poi_employment_agency">کاریابی</string>
|
<string name="poi_employment_agency">کاریابی</string>
|
||||||
<string name="poi_research">مرکز تحقیقاتی</string>
|
<string name="poi_research">مرکز تحقیقاتی</string>
|
||||||
<string name="poi_it">دفتر فناوری اطلاعات</string>
|
<string name="poi_it">دفتر فناوری اطلاعات</string>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<string name="poi_aerialway_station">Station de transport aérien par câble</string>
|
<string name="poi_aerialway_station">Station de transport aérien par câble</string>
|
||||||
<string name="poi_aeroway_gate">Porte d\'embarquement</string>
|
<string name="poi_aeroway_gate">Porte d\'embarquement</string>
|
||||||
<string name="poi_runway">Aérodrome : piste</string>
|
<string name="poi_runway">Aérodrome : piste</string>
|
||||||
<string name="poi_airport">Aérodrome</string>
|
<string name="poi_aerodrome">Aérodrome</string>
|
||||||
<string name="poi_alcohol">Magasin de boissons alcoolisées</string>
|
<string name="poi_alcohol">Magasin de boissons alcoolisées</string>
|
||||||
<string name="poi_alpine_hut">Refuge</string>
|
<string name="poi_alpine_hut">Refuge</string>
|
||||||
<string name="poi_ambulance_station">Station d\'ambulances</string>
|
<string name="poi_ambulance_station">Station d\'ambulances</string>
|
||||||
|
@ -372,7 +372,7 @@
|
||||||
<string name="poi_water_well">Puits</string>
|
<string name="poi_water_well">Puits</string>
|
||||||
<string name="poi_water_works">Usine d\'eau potable</string>
|
<string name="poi_water_works">Usine d\'eau potable</string>
|
||||||
<string name="poi_waterfall">Chute d\'eau</string>
|
<string name="poi_waterfall">Chute d\'eau</string>
|
||||||
<string name="poi_water_mill">Moulin à eau</string>
|
<string name="poi_watermill">Moulin à eau</string>
|
||||||
<string name="poi_wayside_cross">Calvaire</string>
|
<string name="poi_wayside_cross">Calvaire</string>
|
||||||
<string name="poi_wayside_shrine">Oratoire</string>
|
<string name="poi_wayside_shrine">Oratoire</string>
|
||||||
<string name="poi_wetland">Zone humide</string>
|
<string name="poi_wetland">Zone humide</string>
|
||||||
|
@ -420,7 +420,7 @@
|
||||||
<string name="poi_podiatrist">Podologue</string>
|
<string name="poi_podiatrist">Podologue</string>
|
||||||
<string name="poi_psychotherapist">Psychothérapeute</string>
|
<string name="poi_psychotherapist">Psychothérapeute</string>
|
||||||
<string name="poi_company">Entreprise</string>
|
<string name="poi_company">Entreprise</string>
|
||||||
<string name="poi_town_hall">Mairie</string>
|
<string name="poi_townhall">Mairie</string>
|
||||||
<string name="poi_educational_institution">Institution éducative</string>
|
<string name="poi_educational_institution">Institution éducative</string>
|
||||||
<string name="poi_bicycle_track">Piste cycable</string>
|
<string name="poi_bicycle_track">Piste cycable</string>
|
||||||
<string name="poi_australian_football">Football autralien</string>
|
<string name="poi_australian_football">Football autralien</string>
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
<string name="poi_subway_station">Estación de metro</string>
|
<string name="poi_subway_station">Estación de metro</string>
|
||||||
<string name="poi_taxi">Parada de taxis</string>
|
<string name="poi_taxi">Parada de taxis</string>
|
||||||
|
|
||||||
<string name="poi_airport">Aeroporto</string>
|
<string name="poi_aerodrome">Aeroporto</string>
|
||||||
<string name="poi_helipad">Heliporto</string>
|
<string name="poi_helipad">Heliporto</string>
|
||||||
<string name="poi_lighthouse">Faro</string>
|
<string name="poi_lighthouse">Faro</string>
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
<string name="poi_wastewater_plant">Estación depuradora de augas residuais</string>
|
<string name="poi_wastewater_plant">Estación depuradora de augas residuais</string>
|
||||||
<string name="poi_water_tower">Depósito de auga</string>
|
<string name="poi_water_tower">Depósito de auga</string>
|
||||||
<string name="poi_dam">Encoro</string>
|
<string name="poi_dam">Encoro</string>
|
||||||
<string name="poi_water_mill">Aceña</string>
|
<string name="poi_watermill">Aceña</string>
|
||||||
|
|
||||||
<string name="poi_power_substation">Subestación</string>
|
<string name="poi_power_substation">Subestación</string>
|
||||||
<string name="poi_power_transformer">Transformador</string>
|
<string name="poi_power_transformer">Transformador</string>
|
||||||
|
@ -167,7 +167,7 @@
|
||||||
<string name="poi_lawyer">Avogado</string>
|
<string name="poi_lawyer">Avogado</string>
|
||||||
<string name="poi_office_telecommunication">Oficina de telecomunicacións</string>
|
<string name="poi_office_telecommunication">Oficina de telecomunicacións</string>
|
||||||
<string name="poi_ngo">ONG</string>
|
<string name="poi_ngo">ONG</string>
|
||||||
<string name="poi_town_hall">Casa do Concello</string>
|
<string name="poi_townhall">Casa do Concello</string>
|
||||||
<string name="poi_employment_agency">Oficina de emprego</string>
|
<string name="poi_employment_agency">Oficina de emprego</string>
|
||||||
<string name="poi_research">Oficina de investigación</string>
|
<string name="poi_research">Oficina de investigación</string>
|
||||||
<string name="poi_advertising_agency">Axencia de publicidade</string>
|
<string name="poi_advertising_agency">Axencia de publicidade</string>
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
<string name="poi_subway_station">Metrómegálló</string>
|
<string name="poi_subway_station">Metrómegálló</string>
|
||||||
<string name="poi_taxi">Taxidroszt</string>
|
<string name="poi_taxi">Taxidroszt</string>
|
||||||
|
|
||||||
<string name="poi_airport">Repülőtér</string>
|
<string name="poi_aerodrome">Repülőtér</string>
|
||||||
<string name="poi_runway">Kifutópálya</string>
|
<string name="poi_runway">Kifutópálya</string>
|
||||||
<string name="poi_aeroway_terminal">Utasterminál</string>
|
<string name="poi_aeroway_terminal">Utasterminál</string>
|
||||||
<string name="poi_aeroway_gate">Reptér kapu</string>
|
<string name="poi_aeroway_gate">Reptér kapu</string>
|
||||||
|
@ -122,7 +122,7 @@
|
||||||
<string name="poi_dentist">Fogorvos</string>
|
<string name="poi_dentist">Fogorvos</string>
|
||||||
<string name="poi_veterinary">Állatorvos</string>
|
<string name="poi_veterinary">Állatorvos</string>
|
||||||
<string name="poi_sanatorium">Szanatórium</string>
|
<string name="poi_sanatorium">Szanatórium</string>
|
||||||
<string name="poi_town_hall">Városháza</string>
|
<string name="poi_townhall">Városháza</string>
|
||||||
<string name="poi_stadium">Stadion</string>
|
<string name="poi_stadium">Stadion</string>
|
||||||
<string name="poi_sports_centre">Sportközpont</string>
|
<string name="poi_sports_centre">Sportközpont</string>
|
||||||
<string name="poi_golf_course">Golfpálya</string>
|
<string name="poi_golf_course">Golfpálya</string>
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
<string name="poi_bus_station">Stazione bus (obsoleto)</string>
|
<string name="poi_bus_station">Stazione bus (obsoleto)</string>
|
||||||
<string name="poi_railway_subway_entrance">Entrata metropolitana</string>
|
<string name="poi_railway_subway_entrance">Entrata metropolitana</string>
|
||||||
<string name="poi_subway_station">Stazione metropolitana</string>
|
<string name="poi_subway_station">Stazione metropolitana</string>
|
||||||
<string name="poi_airport">Aeroporto</string>
|
<string name="poi_aerodrome">Aeroporto</string>
|
||||||
<string name="poi_helipad">Eliporto</string>
|
<string name="poi_helipad">Eliporto</string>
|
||||||
<string name="poi_bicycle_rental">Noleggio bici</string>
|
<string name="poi_bicycle_rental">Noleggio bici</string>
|
||||||
<string name="poi_bicycle_parking">Parcheggio bici</string>
|
<string name="poi_bicycle_parking">Parcheggio bici</string>
|
||||||
|
@ -135,7 +135,7 @@
|
||||||
<string name="poi_speed_camera">Autovelox</string>
|
<string name="poi_speed_camera">Autovelox</string>
|
||||||
<string name="poi_turning_circle">Rotonda per inversione di marcia</string>
|
<string name="poi_turning_circle">Rotonda per inversione di marcia</string>
|
||||||
<string name="poi_wastewater_plant">Depuratore acque</string>
|
<string name="poi_wastewater_plant">Depuratore acque</string>
|
||||||
<string name="poi_water_mill">Mulino ad acqua</string>
|
<string name="poi_watermill">Mulino ad acqua</string>
|
||||||
|
|
||||||
<string name="poi_power_substation">Sottostazione</string>
|
<string name="poi_power_substation">Sottostazione</string>
|
||||||
<string name="poi_power_transformer">Trasformatore</string>
|
<string name="poi_power_transformer">Trasformatore</string>
|
||||||
|
@ -484,7 +484,7 @@
|
||||||
<string name="poi_craft_tinsmith">Lattoniere</string>
|
<string name="poi_craft_tinsmith">Lattoniere</string>
|
||||||
<string name="poi_craft_upholsterer">Tappezziere</string>
|
<string name="poi_craft_upholsterer">Tappezziere</string>
|
||||||
<string name="poi_funeral_directors">Impresa di pompe funebri</string>
|
<string name="poi_funeral_directors">Impresa di pompe funebri</string>
|
||||||
<string name="poi_town_hall">Municipio</string>
|
<string name="poi_townhall">Municipio</string>
|
||||||
<string name="poi_research">Centro di ricerca e sviluppo</string>
|
<string name="poi_research">Centro di ricerca e sviluppo</string>
|
||||||
<string name="poi_it">Ufficio IT</string>
|
<string name="poi_it">Ufficio IT</string>
|
||||||
<string name="poi_newspaper">Redazione giornalistica</string>
|
<string name="poi_newspaper">Redazione giornalistica</string>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="poi_airport">空港(Aireport)</string>
|
<string name="poi_aerodrome">空港(Aireport)</string>
|
||||||
<string name="poi_bank">銀行(Bank)</string>
|
<string name="poi_bank">銀行(Bank)</string>
|
||||||
<string name="poi_bus_stop">バス停(Bus stop)</string>
|
<string name="poi_bus_stop">バス停(Bus stop)</string>
|
||||||
<string name="poi_car_rental">レンタカー(Car rental)</string>
|
<string name="poi_car_rental">レンタカー(Car rental)</string>
|
||||||
|
@ -252,7 +252,7 @@
|
||||||
<string name="poi_waterway_turning_point">船舶転回所(Waterway turning point)</string>
|
<string name="poi_waterway_turning_point">船舶転回所(Waterway turning point)</string>
|
||||||
<string name="poi_weir">堰(Weir)</string>
|
<string name="poi_weir">堰(Weir)</string>
|
||||||
<string name="poi_dam">ダム(Dam)</string>
|
<string name="poi_dam">ダム(Dam)</string>
|
||||||
<string name="poi_water_mill">水車小屋(Water mill)</string>
|
<string name="poi_watermill">水車小屋(Water mill)</string>
|
||||||
|
|
||||||
<string name="poi_power_substation">変電所(Substation)</string>
|
<string name="poi_power_substation">変電所(Substation)</string>
|
||||||
<string name="poi_power_transformer">変圧器・トランス(Transformer)</string>
|
<string name="poi_power_transformer">変圧器・トランス(Transformer)</string>
|
||||||
|
@ -383,7 +383,7 @@
|
||||||
<string name="poi_lawyer">法律事務所(Lawyer)</string>
|
<string name="poi_lawyer">法律事務所(Lawyer)</string>
|
||||||
<string name="poi_office_telecommunication">通信会社事務所(Telecommunication office)</string>
|
<string name="poi_office_telecommunication">通信会社事務所(Telecommunication office)</string>
|
||||||
<string name="poi_ngo">NGO・非政府組織(NGO)</string>
|
<string name="poi_ngo">NGO・非政府組織(NGO)</string>
|
||||||
<string name="poi_town_hall">町役場・市庁舎(Town hall)</string>
|
<string name="poi_townhall">町役場・市庁舎(Town hall)</string>
|
||||||
<string name="poi_employment_agency">職業紹介所(Employment office)</string>
|
<string name="poi_employment_agency">職業紹介所(Employment office)</string>
|
||||||
<string name="poi_research">研究所(Research office)</string>
|
<string name="poi_research">研究所(Research office)</string>
|
||||||
<string name="poi_it">IT関連事務所(IT office)</string>
|
<string name="poi_it">IT関連事務所(IT office)</string>
|
||||||
|
|
|
@ -145,7 +145,7 @@
|
||||||
<string name="poi_subway_station">지하철 역</string>
|
<string name="poi_subway_station">지하철 역</string>
|
||||||
<string name="poi_taxi">택시 승차장</string>
|
<string name="poi_taxi">택시 승차장</string>
|
||||||
|
|
||||||
<string name="poi_airport">공항</string>
|
<string name="poi_aerodrome">공항</string>
|
||||||
<string name="poi_helipad">헬리콥터 이착륙지</string>
|
<string name="poi_helipad">헬리콥터 이착륙지</string>
|
||||||
<string name="poi_runway">활주로</string>
|
<string name="poi_runway">활주로</string>
|
||||||
<string name="poi_aeroway_terminal">Aeroway 터미널</string>
|
<string name="poi_aeroway_terminal">Aeroway 터미널</string>
|
||||||
|
@ -182,7 +182,7 @@
|
||||||
<string name="poi_lock_gate">게이트 잠금</string>
|
<string name="poi_lock_gate">게이트 잠금</string>
|
||||||
<string name="poi_waterway_turning_point">수로 터닝 포인트</string>
|
<string name="poi_waterway_turning_point">수로 터닝 포인트</string>
|
||||||
<string name="poi_dam">댐</string>
|
<string name="poi_dam">댐</string>
|
||||||
<string name="poi_water_mill">물방앗간</string>
|
<string name="poi_watermill">물방앗간</string>
|
||||||
|
|
||||||
<string name="poi_power_substation">변전소</string>
|
<string name="poi_power_substation">변전소</string>
|
||||||
<string name="poi_power_transformer">변압기</string>
|
<string name="poi_power_transformer">변압기</string>
|
||||||
|
@ -277,7 +277,7 @@
|
||||||
<string name="poi_lawyer">변호사</string>
|
<string name="poi_lawyer">변호사</string>
|
||||||
<string name="poi_office_telecommunication">원거리 통신 사무실</string>
|
<string name="poi_office_telecommunication">원거리 통신 사무실</string>
|
||||||
<string name="poi_ngo">NGO</string>
|
<string name="poi_ngo">NGO</string>
|
||||||
<string name="poi_town_hall">타운 홀</string>
|
<string name="poi_townhall">타운 홀</string>
|
||||||
<string name="poi_employment_agency">Employment 사무실</string>
|
<string name="poi_employment_agency">Employment 사무실</string>
|
||||||
<string name="poi_research">연구 사무실</string>
|
<string name="poi_research">연구 사무실</string>
|
||||||
<string name="poi_it">IT 사무실</string>
|
<string name="poi_it">IT 사무실</string>
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
<string name="poi_subway_station">T-banestasjon</string>
|
<string name="poi_subway_station">T-banestasjon</string>
|
||||||
<string name="poi_taxi">Taxiholdeplass</string>
|
<string name="poi_taxi">Taxiholdeplass</string>
|
||||||
|
|
||||||
<string name="poi_airport">Flyplass</string>
|
<string name="poi_aerodrome">Flyplass</string>
|
||||||
<string name="poi_ferry_terminal">Fergeterminal</string>
|
<string name="poi_ferry_terminal">Fergeterminal</string>
|
||||||
<string name="poi_lighthouse">Fyrtårn</string>
|
<string name="poi_lighthouse">Fyrtårn</string>
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,7 @@
|
||||||
<string name="poi_subway_station">Metrostation</string>
|
<string name="poi_subway_station">Metrostation</string>
|
||||||
<string name="poi_taxi">Taxistandplaats</string>
|
<string name="poi_taxi">Taxistandplaats</string>
|
||||||
|
|
||||||
<string name="poi_airport">Luchthaven</string>
|
<string name="poi_aerodrome">Luchthaven</string>
|
||||||
<string name="poi_helipad">Helikopterplatform</string>
|
<string name="poi_helipad">Helikopterplatform</string>
|
||||||
<string name="poi_runway">Landingsbaan</string>
|
<string name="poi_runway">Landingsbaan</string>
|
||||||
<string name="poi_aeroway_terminal">Terminal</string>
|
<string name="poi_aeroway_terminal">Terminal</string>
|
||||||
|
@ -209,7 +209,7 @@
|
||||||
<string name="poi_estate_agent">Vastgoedmakelaar</string>
|
<string name="poi_estate_agent">Vastgoedmakelaar</string>
|
||||||
<string name="poi_lawyer">Advocaat</string>
|
<string name="poi_lawyer">Advocaat</string>
|
||||||
<string name="poi_ngo">NGO</string>
|
<string name="poi_ngo">NGO</string>
|
||||||
<string name="poi_town_hall">Stadhuis</string>
|
<string name="poi_townhall">Stadhuis</string>
|
||||||
<string name="poi_advertising_agency">Reclamebureau</string>
|
<string name="poi_advertising_agency">Reclamebureau</string>
|
||||||
<string name="poi_educational_institution">Onderwijsinstelling</string>
|
<string name="poi_educational_institution">Onderwijsinstelling</string>
|
||||||
<string name="poi_architect">Architectenkantoor</string>
|
<string name="poi_architect">Architectenkantoor</string>
|
||||||
|
@ -433,7 +433,7 @@
|
||||||
<string name="poi_lock_gate">Schutsluis</string>
|
<string name="poi_lock_gate">Schutsluis</string>
|
||||||
<string name="poi_waterway_turning_point">Zwaaikom</string>
|
<string name="poi_waterway_turning_point">Zwaaikom</string>
|
||||||
<string name="poi_weir">Stuw</string>
|
<string name="poi_weir">Stuw</string>
|
||||||
<string name="poi_water_mill">Watermolen</string>
|
<string name="poi_watermill">Watermolen</string>
|
||||||
|
|
||||||
<string name="poi_power_substation">Onderstation</string>
|
<string name="poi_power_substation">Onderstation</string>
|
||||||
<string name="poi_power_transformer">Transformator</string>
|
<string name="poi_power_transformer">Transformator</string>
|
||||||
|
|
|
@ -146,7 +146,7 @@
|
||||||
<string name="poi_subway_station">Stacja metra</string>
|
<string name="poi_subway_station">Stacja metra</string>
|
||||||
<string name="poi_taxi">Postój TAXI</string>
|
<string name="poi_taxi">Postój TAXI</string>
|
||||||
|
|
||||||
<string name="poi_airport">Lotnisko</string>
|
<string name="poi_aerodrome">Lotnisko</string>
|
||||||
<string name="poi_helipad">Lądowisko helikopterów</string>
|
<string name="poi_helipad">Lądowisko helikopterów</string>
|
||||||
<string name="poi_runway">Pas startowy</string>
|
<string name="poi_runway">Pas startowy</string>
|
||||||
<string name="poi_aeroway_terminal">Terminal lotniczy</string>
|
<string name="poi_aeroway_terminal">Terminal lotniczy</string>
|
||||||
|
@ -188,7 +188,7 @@
|
||||||
<string name="poi_wastewater_plant">Oczyszczalnia ścieków</string>
|
<string name="poi_wastewater_plant">Oczyszczalnia ścieków</string>
|
||||||
<string name="poi_water_tower">Wieża ciśnień</string>
|
<string name="poi_water_tower">Wieża ciśnień</string>
|
||||||
<string name="poi_dam">Tama</string>
|
<string name="poi_dam">Tama</string>
|
||||||
<string name="poi_water_mill">Młyn wodny</string>
|
<string name="poi_watermill">Młyn wodny</string>
|
||||||
|
|
||||||
<string name="poi_power_substation">Podstacja</string>
|
<string name="poi_power_substation">Podstacja</string>
|
||||||
<string name="poi_power_transformer">Transformator</string>
|
<string name="poi_power_transformer">Transformator</string>
|
||||||
|
@ -269,7 +269,7 @@
|
||||||
<string name="poi_estate_agent">Agent nieruchomości</string>
|
<string name="poi_estate_agent">Agent nieruchomości</string>
|
||||||
<string name="poi_lawyer">Prawnik</string>
|
<string name="poi_lawyer">Prawnik</string>
|
||||||
<string name="poi_ngo">Organizacja pozarządowa</string>
|
<string name="poi_ngo">Organizacja pozarządowa</string>
|
||||||
<string name="poi_town_hall">Ratusz</string>
|
<string name="poi_townhall">Ratusz</string>
|
||||||
<string name="poi_employment_agency">Urząd pracy</string>
|
<string name="poi_employment_agency">Urząd pracy</string>
|
||||||
<string name="poi_advertising_agency">Agencja reklamowa</string>
|
<string name="poi_advertising_agency">Agencja reklamowa</string>
|
||||||
<string name="poi_educational_institution">Instytucja edukacyjna</string>
|
<string name="poi_educational_institution">Instytucja edukacyjna</string>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<resources>
|
<resources>
|
||||||
<string name="poi_bakery">Булочная</string>
|
<string name="poi_bakery">Булочная</string>
|
||||||
<string name="poi_alcohol">Винно-водочный магазин</string>
|
<string name="poi_alcohol">Винно-водочный магазин</string>
|
||||||
<string name="poi_convenience">Магазин</string>
|
<string name="poi_convenience">Продуктовый магазин</string>
|
||||||
<string name="poi_mall">Торговый центр</string>
|
<string name="poi_mall">Торговый центр</string>
|
||||||
<string name="poi_beverages">Напитки</string>
|
<string name="poi_beverages">Напитки</string>
|
||||||
<string name="poi_butcher">Мясная лавка</string>
|
<string name="poi_butcher">Мясная лавка</string>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<string name="poi_confectionery">Кондитерская</string>
|
<string name="poi_confectionery">Кондитерская</string>
|
||||||
<string name="poi_ice_cream">Мороженое</string>
|
<string name="poi_ice_cream">Мороженое</string>
|
||||||
<string name="poi_supermarket">Супермаркет</string>
|
<string name="poi_supermarket">Супермаркет</string>
|
||||||
<string name="poi_shop_tea">Чайный магазин</string>
|
<string name="poi_tea">Чайный магазин</string>
|
||||||
<string name="poi_dairy">Молочный магазин</string>
|
<string name="poi_dairy">Молочный магазин</string>
|
||||||
<string name="poi_vending_machine">Торговый автомат</string>
|
<string name="poi_vending_machine">Торговый автомат</string>
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
<string name="poi_interior_decoration">Декор и оформление</string>
|
<string name="poi_interior_decoration">Декор и оформление</string>
|
||||||
<string name="poi_jewelry">Ювелирный магазин</string>
|
<string name="poi_jewelry">Ювелирный магазин</string>
|
||||||
<string name="poi_kiosk">Киоск, ларёк</string>
|
<string name="poi_kiosk">Киоск, ларёк</string>
|
||||||
<string name="poi_kitchen">Кухонные принадлежности</string>
|
<string name="poi_kitchen">Кухни</string>
|
||||||
<string name="poi_mobile_phone">Салон связи</string>
|
<string name="poi_mobile_phone">Салон связи</string>
|
||||||
<string name="poi_motorcycle">Мотоциклы</string>
|
<string name="poi_motorcycle">Мотоциклы</string>
|
||||||
<string name="poi_musical_instrument">Музыкальные инструменты</string>
|
<string name="poi_musical_instrument">Музыкальные инструменты</string>
|
||||||
|
@ -147,7 +147,7 @@
|
||||||
<string name="poi_subway_station">Станция метро</string>
|
<string name="poi_subway_station">Станция метро</string>
|
||||||
<string name="poi_taxi">Стоянка такси</string>
|
<string name="poi_taxi">Стоянка такси</string>
|
||||||
|
|
||||||
<string name="poi_airport">Аэропорт</string>
|
<string name="poi_aerodrome">Аэропорт</string>
|
||||||
<string name="poi_helipad">Вертолётная площадка</string>
|
<string name="poi_helipad">Вертолётная площадка</string>
|
||||||
<string name="poi_runway">Взлётная полоса</string>
|
<string name="poi_runway">Взлётная полоса</string>
|
||||||
<string name="poi_aeroway_terminal">Терминал аэропорта</string>
|
<string name="poi_aeroway_terminal">Терминал аэропорта</string>
|
||||||
|
@ -189,7 +189,7 @@
|
||||||
<string name="poi_waterway_turning_point">Поворотная точка на воде</string>
|
<string name="poi_waterway_turning_point">Поворотная точка на воде</string>
|
||||||
<string name="poi_weir">Небольшая плотина</string>
|
<string name="poi_weir">Небольшая плотина</string>
|
||||||
<string name="poi_dam">Дамба</string>
|
<string name="poi_dam">Дамба</string>
|
||||||
<string name="poi_water_mill">Водяная мельница</string>
|
<string name="poi_watermill">Водяная мельница</string>
|
||||||
|
|
||||||
<string name="poi_power_substation">Подстанция</string>
|
<string name="poi_power_substation">Подстанция</string>
|
||||||
<string name="poi_power_transformer">Трансформатор</string>
|
<string name="poi_power_transformer">Трансформатор</string>
|
||||||
|
@ -271,7 +271,7 @@
|
||||||
<string name="poi_lawyer">Юридические услуги</string>
|
<string name="poi_lawyer">Юридические услуги</string>
|
||||||
<string name="poi_office_telecommunication">Телекоммуникационная компания</string>
|
<string name="poi_office_telecommunication">Телекоммуникационная компания</string>
|
||||||
<string name="poi_ngo">Общественная организация</string>
|
<string name="poi_ngo">Общественная организация</string>
|
||||||
<string name="poi_town_hall">Администрация населенного пункта</string>
|
<string name="poi_townhall">Администрация населенного пункта</string>
|
||||||
<string name="poi_employment_agency">Биржа труда</string>
|
<string name="poi_employment_agency">Биржа труда</string>
|
||||||
<string name="poi_research">Исследовательский центр</string>
|
<string name="poi_research">Исследовательский центр</string>
|
||||||
<string name="poi_it">Информационные технологии</string>
|
<string name="poi_it">Информационные технологии</string>
|
||||||
|
|
|
@ -310,7 +310,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<string name="local_index_installed">Локальная версия</string>
|
<string name="local_index_installed">Загружено</string>
|
||||||
<string name="local_index_items_backuped">%1$d из %2$d объектов успешно архивированы.</string>
|
<string name="local_index_items_backuped">%1$d из %2$d объектов успешно архивированы.</string>
|
||||||
<string name="local_index_items_deleted">%1$d из %2$d объектов успешно удалены.</string>
|
<string name="local_index_items_deleted">%1$d из %2$d объектов успешно удалены.</string>
|
||||||
<string name="local_index_items_restored">%1$d из %2$d объектов успешно активированы.</string>
|
<string name="local_index_items_restored">%1$d из %2$d объектов успешно активированы.</string>
|
||||||
|
@ -1933,8 +1933,8 @@
|
||||||
<string name="delay_to_start_navigation">Задержка начала навигации…</string>
|
<string name="delay_to_start_navigation">Задержка начала навигации…</string>
|
||||||
<string name="shared_string_go">Поехали</string>
|
<string name="shared_string_go">Поехали</string>
|
||||||
<string name="shared_string_not_use">Не использовать</string>
|
<string name="shared_string_not_use">Не использовать</string>
|
||||||
<string name="plugin_nautical_descr">"Плагин обогащает карты и навигацию OsmAnd, а также делает доступными морские карты для катания на лодках, парусного спорта, и других видов спорта.
|
<string name="plugin_nautical_descr">"Плагин расширяет возможности OsmAnd, делая доступными морские карты для катания на лодках, парусного спорта и других видов спорта.
|
||||||
\n\nСпециальная карта дополнение для OsmAnd добавляет морские навигационные и условные знаки, для внутренней, так и для прибрежной навигации. Описание каждой навигационной отметки содержит информацию, необходимую для идентификации, а также её значение (категория, форма, цвет, последовательность, ссылка и т.д.).\n\nЧтобы вернуться к одному из традиционных стилей карт в OsmAnd, просто деактивируйте этот плагин или измените на желаемый \"Стиль карты\" в разделе \"Настройка карты\". "</string>
|
\n\nСпециальная дополнительная карта для OsmAnd добавляет морские навигационные и условные знаки как для внутренней, так и для прибрежной навигации. Описание навигационных отметок содержит информацию, необходимую для их идентификации, а также их характеристики (категория, форма, цвет, последовательность мерцания огней и т.д.).\n\nЧтобы вернуться к одному из традиционных стилей карт в OsmAnd, просто деактивируйте этот плагин или измените на желаемый \"Стиль карты\" в разделе \"Настройка карты\". "</string>
|
||||||
<string name="local_osm_changes_upload_all_confirm">Вы собираетесь загрузить %1$d изменений OSM. Вы уверены?</string>
|
<string name="local_osm_changes_upload_all_confirm">Вы собираетесь загрузить %1$d изменений OSM. Вы уверены?</string>
|
||||||
<string name="confirmation_to_clear_history">Вы хотите очистить историю?</string>
|
<string name="confirmation_to_clear_history">Вы хотите очистить историю?</string>
|
||||||
<string name="plugin_ski_descr">"Плагин обеспечивает вам доступ к данным о горнолыжных трассах, маршрутах для беговых лыж, альпийских спусках, фуникулерах и горнолыжных подъемниках. Маршруты и спуски отмечены разными цветами в зависимости от их сложности и изображены с использованием специального \"зимнего\" стиля карты, который заключается в том, что используются \"снежные\" цвета зимнего пейзажа.\n\nВ случае активации этого вида, стиль карты меняется на \"Winter and ski\", показывая все детали пейзажа так, как они выглядят зимой. Такой (зимний) вид может быть отменен либо путем деактивации здесь, либо если вы поменяете \"Стиль карты\" в меню \"Настройка карты\" на желаемый вид. "</string>
|
<string name="plugin_ski_descr">"Плагин обеспечивает вам доступ к данным о горнолыжных трассах, маршрутах для беговых лыж, альпийских спусках, фуникулерах и горнолыжных подъемниках. Маршруты и спуски отмечены разными цветами в зависимости от их сложности и изображены с использованием специального \"зимнего\" стиля карты, который заключается в том, что используются \"снежные\" цвета зимнего пейзажа.\n\nВ случае активации этого вида, стиль карты меняется на \"Winter and ski\", показывая все детали пейзажа так, как они выглядят зимой. Такой (зимний) вид может быть отменен либо путем деактивации здесь, либо если вы поменяете \"Стиль карты\" в меню \"Настройка карты\" на желаемый вид. "</string>
|
||||||
|
|
|
@ -124,7 +124,7 @@
|
||||||
<string name="poi_subway_station">Istatzione de sa metropolitana</string>
|
<string name="poi_subway_station">Istatzione de sa metropolitana</string>
|
||||||
<string name="poi_taxi">Postèggiu de sos taxi</string>
|
<string name="poi_taxi">Postèggiu de sos taxi</string>
|
||||||
|
|
||||||
<string name="poi_airport">Aeroportu</string>
|
<string name="poi_aerodrome">Aeroportu</string>
|
||||||
<string name="poi_helipad">Eliportu</string>
|
<string name="poi_helipad">Eliportu</string>
|
||||||
<string name="poi_runway">Pista d\'aterazu</string>
|
<string name="poi_runway">Pista d\'aterazu</string>
|
||||||
<string name="poi_slipway">Lassinadòrju</string>
|
<string name="poi_slipway">Lassinadòrju</string>
|
||||||
|
@ -155,7 +155,7 @@
|
||||||
<string name="poi_wastewater_plant">Depuradore de sas abbas</string>
|
<string name="poi_wastewater_plant">Depuradore de sas abbas</string>
|
||||||
<string name="poi_water_tower">Turre ìdrica</string>
|
<string name="poi_water_tower">Turre ìdrica</string>
|
||||||
<string name="poi_dam">Diga</string>
|
<string name="poi_dam">Diga</string>
|
||||||
<string name="poi_water_mill">Mulinu ad abba</string>
|
<string name="poi_watermill">Mulinu ad abba</string>
|
||||||
|
|
||||||
<string name="poi_power_transformer">Trasformadore</string>
|
<string name="poi_power_transformer">Trasformadore</string>
|
||||||
<string name="poi_power_plant">Tzentrale elètrica</string>
|
<string name="poi_power_plant">Tzentrale elètrica</string>
|
||||||
|
@ -224,7 +224,7 @@
|
||||||
<string name="poi_estate_agent">Butega immobiliare</string>
|
<string name="poi_estate_agent">Butega immobiliare</string>
|
||||||
<string name="poi_lawyer">Abogadu</string>
|
<string name="poi_lawyer">Abogadu</string>
|
||||||
<string name="poi_ngo">ONG</string>
|
<string name="poi_ngo">ONG</string>
|
||||||
<string name="poi_town_hall">Munitzìpiu</string>
|
<string name="poi_townhall">Munitzìpiu</string>
|
||||||
<string name="poi_employment_agency">Ufìtziu pro su traballu</string>
|
<string name="poi_employment_agency">Ufìtziu pro su traballu</string>
|
||||||
<string name="poi_it">Ufìtziu IT</string>
|
<string name="poi_it">Ufìtziu IT</string>
|
||||||
<string name="poi_newspaper">Redatzione de giornale</string>
|
<string name="poi_newspaper">Redatzione de giornale</string>
|
||||||
|
|
|
@ -163,7 +163,7 @@
|
||||||
<string name="poi_railway_buffer_stop">Železničná zarážka</string>
|
<string name="poi_railway_buffer_stop">Železničná zarážka</string>
|
||||||
<string name="poi_taxi">Stanovište taxíkov</string>
|
<string name="poi_taxi">Stanovište taxíkov</string>
|
||||||
|
|
||||||
<string name="poi_airport">Letisko</string>
|
<string name="poi_aerodrome">Letisko</string>
|
||||||
<string name="poi_helipad">Plocha pre vrtuľníky</string>
|
<string name="poi_helipad">Plocha pre vrtuľníky</string>
|
||||||
<string name="poi_runway">Pristávacia dráha</string>
|
<string name="poi_runway">Pristávacia dráha</string>
|
||||||
<string name="poi_aeroway_terminal">Terminál</string>
|
<string name="poi_aeroway_terminal">Terminál</string>
|
||||||
|
@ -205,7 +205,7 @@
|
||||||
<string name="poi_waterway_turning_point">Obratisko na vode</string>
|
<string name="poi_waterway_turning_point">Obratisko na vode</string>
|
||||||
<string name="poi_weir">Vzdúvacia hrádza</string>
|
<string name="poi_weir">Vzdúvacia hrádza</string>
|
||||||
<string name="poi_dam">Priehrada/Hrádza</string>
|
<string name="poi_dam">Priehrada/Hrádza</string>
|
||||||
<string name="poi_water_mill">Vodný mlyn</string>
|
<string name="poi_watermill">Vodný mlyn</string>
|
||||||
|
|
||||||
<string name="poi_power_substation">Elektrická stanica</string>
|
<string name="poi_power_substation">Elektrická stanica</string>
|
||||||
<string name="poi_power_transformer">Transformátor</string>
|
<string name="poi_power_transformer">Transformátor</string>
|
||||||
|
@ -291,7 +291,7 @@
|
||||||
<string name="poi_lawyer">Právnik</string>
|
<string name="poi_lawyer">Právnik</string>
|
||||||
<string name="poi_office_telecommunication">Telekomunikácie</string>
|
<string name="poi_office_telecommunication">Telekomunikácie</string>
|
||||||
<string name="poi_ngo">Nezisková organizácia</string>
|
<string name="poi_ngo">Nezisková organizácia</string>
|
||||||
<string name="poi_town_hall">Radnica</string>
|
<string name="poi_townhall">Radnica</string>
|
||||||
<string name="poi_employment_agency">Personálna agentúra</string>
|
<string name="poi_employment_agency">Personálna agentúra</string>
|
||||||
<string name="poi_research">Výskumný ústav</string>
|
<string name="poi_research">Výskumný ústav</string>
|
||||||
<string name="poi_it">Informačné technológie</string>
|
<string name="poi_it">Informačné technológie</string>
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
<attr name="btn_flat_bg" format="reference" />
|
<attr name="btn_flat_bg" format="reference" />
|
||||||
<attr name="card_bg_color" format="reference" />
|
<attr name="card_bg_color" format="reference" />
|
||||||
<attr name="spinnerItemTextColor" format="reference" />
|
<attr name="spinnerItemTextColor" format="reference" />
|
||||||
|
<attr name="spinnerListBackground" format="color|reference" />
|
||||||
<attr name="dashboard_divider" format="reference" />
|
<attr name="dashboard_divider" format="reference" />
|
||||||
<attr name="dashboard_button" format="reference" />
|
<attr name="dashboard_button" format="reference" />
|
||||||
<attr name="search_background" format="reference" />
|
<attr name="search_background" format="reference" />
|
||||||
|
|
|
@ -151,4 +151,7 @@
|
||||||
|
|
||||||
<color name="plugin_details_install_header_bg_light">#dbdbdb</color>
|
<color name="plugin_details_install_header_bg_light">#dbdbdb</color>
|
||||||
<color name="plugin_details_install_header_bg_dark">#2d3438</color>
|
<color name="plugin_details_install_header_bg_dark">#2d3438</color>
|
||||||
|
|
||||||
|
<color name="spinner_list_background_light">#eeeeee</color>
|
||||||
|
<color name="spinner_list_background_dark">#303030</color>
|
||||||
</resources>
|
</resources>
|
|
@ -57,7 +57,7 @@
|
||||||
<string name="poi_confectionery">Confectionery</string>
|
<string name="poi_confectionery">Confectionery</string>
|
||||||
<string name="poi_ice_cream">Ice cream parlor</string>
|
<string name="poi_ice_cream">Ice cream parlor</string>
|
||||||
<string name="poi_supermarket">Supermarket</string>
|
<string name="poi_supermarket">Supermarket</string>
|
||||||
<string name="poi_shop_tea">Tea shop</string>
|
<string name="poi_tea">Tea shop</string>
|
||||||
<string name="poi_dairy">Dairy shop</string>
|
<string name="poi_dairy">Dairy shop</string>
|
||||||
<string name="poi_vending_machine">Vending machine</string>
|
<string name="poi_vending_machine">Vending machine</string>
|
||||||
<string name="poi_wine">Wine shop</string>
|
<string name="poi_wine">Wine shop</string>
|
||||||
|
@ -221,7 +221,7 @@
|
||||||
<string name="poi_railway_buffer_stop">Railway buffer stop</string>
|
<string name="poi_railway_buffer_stop">Railway buffer stop</string>
|
||||||
<string name="poi_taxi">Taxi stand</string>
|
<string name="poi_taxi">Taxi stand</string>
|
||||||
|
|
||||||
<string name="poi_airport">Airport</string>
|
<string name="poi_aerodrome">Airport</string>
|
||||||
<string name="poi_helipad">Helipad</string>
|
<string name="poi_helipad">Helipad</string>
|
||||||
<string name="poi_runway">Runway</string>
|
<string name="poi_runway">Runway</string>
|
||||||
<string name="poi_aeroway_terminal">Aeroway terminal</string>
|
<string name="poi_aeroway_terminal">Aeroway terminal</string>
|
||||||
|
@ -266,7 +266,7 @@
|
||||||
<string name="poi_waterway_turning_point">Waterway turning point</string>
|
<string name="poi_waterway_turning_point">Waterway turning point</string>
|
||||||
<string name="poi_weir">Weir</string>
|
<string name="poi_weir">Weir</string>
|
||||||
<string name="poi_dam">Dam</string>
|
<string name="poi_dam">Dam</string>
|
||||||
<string name="poi_water_mill">Water mill</string>
|
<string name="poi_watermill">Water mill</string>
|
||||||
|
|
||||||
<string name="poi_power_substation">Substation</string>
|
<string name="poi_power_substation">Substation</string>
|
||||||
<string name="poi_power_transformer">Transformer</string>
|
<string name="poi_power_transformer">Transformer</string>
|
||||||
|
@ -379,7 +379,7 @@
|
||||||
<string name="poi_lawyer">Lawyer</string>
|
<string name="poi_lawyer">Lawyer</string>
|
||||||
<string name="poi_office_telecommunication">Telecommunication office</string>
|
<string name="poi_office_telecommunication">Telecommunication office</string>
|
||||||
<string name="poi_ngo">NGO</string>
|
<string name="poi_ngo">NGO</string>
|
||||||
<string name="poi_town_hall">Town hall</string>
|
<string name="poi_townhall">Town hall</string>
|
||||||
<string name="poi_employment_agency">Employment office</string>
|
<string name="poi_employment_agency">Employment office</string>
|
||||||
<string name="poi_research">Research office</string>
|
<string name="poi_research">Research office</string>
|
||||||
<string name="poi_it">IT office</string>
|
<string name="poi_it">IT office</string>
|
||||||
|
|
|
@ -9,6 +9,13 @@
|
||||||
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
|
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
|
||||||
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
|
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
|
||||||
-->
|
-->
|
||||||
|
<string name="osm_edit_context_menu_delete">Delete Osm Edit</string>
|
||||||
|
<string name="rendering_value_disabled_name">Disabled</string>
|
||||||
|
<string name="rendering_value_walkingRoutesScopeOSMC_name">Coloring according to route scope</string>
|
||||||
|
<string name="rendering_value_walkingRoutesOSMC_name">Coloring according to OSMC</string>
|
||||||
|
<string name="osmo_share_my_location">Share my location</string>
|
||||||
|
<string name="shared_string_logoff">Log Off</string>
|
||||||
|
<string name="rendering_attr_hideHouseNumbers_name">Hide house numbers</string>
|
||||||
<string name="application_dir_change_warning3">Do you want OsmAnd to also copy its data files to the new destination?</string>
|
<string name="application_dir_change_warning3">Do you want OsmAnd to also copy its data files to the new destination?</string>
|
||||||
<string name="specified_directiory_not_writeable">Maps could not be created in specified directory</string>
|
<string name="specified_directiory_not_writeable">Maps could not be created in specified directory</string>
|
||||||
<string name="copying_osmand_file_failed">Copying files failed</string>
|
<string name="copying_osmand_file_failed">Copying files failed</string>
|
||||||
|
|
|
@ -86,7 +86,8 @@
|
||||||
<item name="dashboard_general_button_text_color">@color/dashboard_general_button_text_light</item>
|
<item name="dashboard_general_button_text_color">@color/dashboard_general_button_text_light</item>
|
||||||
<item name="android:listChoiceIndicatorMultiple">@drawable/check_light</item>
|
<item name="android:listChoiceIndicatorMultiple">@drawable/check_light</item>
|
||||||
<item name="android:textColorPrimary">@color/color_black</item>
|
<item name="android:textColorPrimary">@color/color_black</item>
|
||||||
<item name="spinnerItemTextColor">@color/color_white</item>
|
<item name="spinnerItemTextColor">@color/color_black</item>
|
||||||
|
<item name="spinnerListBackground">@color/spinner_list_background_light</item>
|
||||||
|
|
||||||
<item name="android:actionModeBackground">@color/actionbar_light_color</item>
|
<item name="android:actionModeBackground">@color/actionbar_light_color</item>
|
||||||
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBarLight</item>
|
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBarLight</item>
|
||||||
|
@ -128,6 +129,7 @@
|
||||||
<item name="android:listChoiceIndicatorMultiple">@drawable/check_dark</item>
|
<item name="android:listChoiceIndicatorMultiple">@drawable/check_dark</item>
|
||||||
<item name="android:textColorPrimary">@color/color_white</item>
|
<item name="android:textColorPrimary">@color/color_white</item>
|
||||||
<item name="spinnerItemTextColor">@color/color_white</item>
|
<item name="spinnerItemTextColor">@color/color_white</item>
|
||||||
|
<item name="spinnerListBackground">@color/spinner_list_background_dark</item>
|
||||||
|
|
||||||
|
|
||||||
<item name="android:actionModeBackground">@color/actionbar_dark_color</item>
|
<item name="android:actionModeBackground">@color/actionbar_dark_color</item>
|
||||||
|
|
|
@ -19,6 +19,8 @@ public class PointDescription {
|
||||||
private String type = "";
|
private String type = "";
|
||||||
private String name = "";
|
private String name = "";
|
||||||
private String typeName;
|
private String typeName;
|
||||||
|
private double lat = 0;
|
||||||
|
private double lon = 0;
|
||||||
|
|
||||||
public static final String POINT_TYPE_FAVORITE = "favorite";
|
public static final String POINT_TYPE_FAVORITE = "favorite";
|
||||||
public static final String POINT_TYPE_WPT = "wpt";
|
public static final String POINT_TYPE_WPT = "wpt";
|
||||||
|
@ -37,6 +39,12 @@ public class PointDescription {
|
||||||
|
|
||||||
public static final PointDescription LOCATION_POINT = new PointDescription(POINT_TYPE_LOCATION, "");
|
public static final PointDescription LOCATION_POINT = new PointDescription(POINT_TYPE_LOCATION, "");
|
||||||
|
|
||||||
|
public PointDescription(double lat, double lon) {
|
||||||
|
this(POINT_TYPE_LOCATION, "");
|
||||||
|
this.lat = lat;
|
||||||
|
this.lon = lon;
|
||||||
|
}
|
||||||
|
|
||||||
public PointDescription(String type, String name) {
|
public PointDescription(String type, String name) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
@ -54,6 +62,14 @@ public class PointDescription {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setLat(double lat) {
|
||||||
|
this.lat = lat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLon(double lon) {
|
||||||
|
this.lon = lon;
|
||||||
|
}
|
||||||
|
|
||||||
public void setTypeName(String typeName){
|
public void setTypeName(String typeName){
|
||||||
this.typeName = typeName;
|
this.typeName = typeName;
|
||||||
}
|
}
|
||||||
|
@ -72,7 +88,7 @@ public class PointDescription {
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
public String getSimpleName(Context ctx, double lat, double lon, boolean addTypeName) {
|
public String getSimpleName(Context ctx, boolean addTypeName) {
|
||||||
if (isLocation()) {
|
if (isLocation()) {
|
||||||
return getLocationName(ctx, lat, lon, true).replace('\n', ' ');
|
return getLocationName(ctx, lat, lon, true).replace('\n', ' ');
|
||||||
}
|
}
|
||||||
|
@ -86,7 +102,7 @@ public class PointDescription {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFullPlainName(Context ctx, double lat, double lon) {
|
public String getFullPlainName(Context ctx) {
|
||||||
if (isLocation()) {
|
if (isLocation()) {
|
||||||
return getLocationName(ctx, lat, lon, false);
|
return getLocationName(ctx, lat, lon, false);
|
||||||
} else {
|
} else {
|
||||||
|
@ -117,7 +133,13 @@ public class PointDescription {
|
||||||
return pnt.zone_number + "" + pnt.zone_letter + " " + ((long) pnt.northing) + " "
|
return pnt.zone_number + "" + pnt.zone_letter + " " + ((long) pnt.northing) + " "
|
||||||
+ ((long) pnt.easting);
|
+ ((long) pnt.easting);
|
||||||
} else {
|
} else {
|
||||||
return ctx.getString( sh? R.string.short_location_on_map : R.string.location_on_map, convert(lat, f), convert(lon, f));
|
try {
|
||||||
|
return ctx.getString(sh ? R.string.short_location_on_map : R.string.location_on_map, convert(lat, f),
|
||||||
|
convert(lon, f));
|
||||||
|
} catch(RuntimeException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return ctx.getString(sh ? R.string.short_location_on_map : R.string.location_on_map, 0, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,6 +183,8 @@ public class PointDescription {
|
||||||
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
||||||
result = prime * result + ((type == null) ? 0 : type.hashCode());
|
result = prime * result + ((type == null) ? 0 : type.hashCode());
|
||||||
result = prime * result + ((typeName == null) ? 0 : typeName.hashCode());
|
result = prime * result + ((typeName == null) ? 0 : typeName.hashCode());
|
||||||
|
result = prime * result + ((lat == 0) ? 0 : new Double(lat).hashCode());
|
||||||
|
result = prime * result + ((lon == 0) ? 0 : new Double(lon).hashCode());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,6 +197,8 @@ public class PointDescription {
|
||||||
PointDescription other = (PointDescription) obj;
|
PointDescription other = (PointDescription) obj;
|
||||||
if (Algorithms.objectEquals(other.name, name)
|
if (Algorithms.objectEquals(other.name, name)
|
||||||
&& Algorithms.objectEquals(other.type, type)
|
&& Algorithms.objectEquals(other.type, type)
|
||||||
|
&& Algorithms.objectEquals(other.lat, lat)
|
||||||
|
&& Algorithms.objectEquals(other.lon, lon)
|
||||||
&& Algorithms.objectEquals(other.typeName, typeName)) {
|
&& Algorithms.objectEquals(other.typeName, typeName)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -182,7 +208,7 @@ public class PointDescription {
|
||||||
|
|
||||||
public static String getSimpleName(LocationPoint o, Context ctx) {
|
public static String getSimpleName(LocationPoint o, Context ctx) {
|
||||||
PointDescription pd = o.getPointDescription(ctx);
|
PointDescription pd = o.getPointDescription(ctx);
|
||||||
return pd.getSimpleName(ctx, o.getLatitude(), o.getLongitude(), true);
|
return pd.getSimpleName(ctx, true);
|
||||||
// return o.getPointDescription(ctx).getFullPlainName(ctx, o.getLatitude(), o.getLongitude());
|
// return o.getPointDescription(ctx).getFullPlainName(ctx, o.getLatitude(), o.getLongitude());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,20 +223,25 @@ public class PointDescription {
|
||||||
return tp + "#" + p.name;
|
return tp + "#" + p.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PointDescription deserializeFromString(String s) {
|
public static PointDescription deserializeFromString(String s, LatLon l) {
|
||||||
|
PointDescription pd = null;
|
||||||
if (s != null && s.length() > 0) {
|
if (s != null && s.length() > 0) {
|
||||||
int in = s.indexOf('#');
|
int in = s.indexOf('#');
|
||||||
if (in >= 0) {
|
if (in >= 0) {
|
||||||
String nm = s.substring(in + 1).trim();
|
String nm = s.substring(in + 1).trim();
|
||||||
String tp = s.substring(0, in);
|
String tp = s.substring(0, in);
|
||||||
if(tp.contains(".")) {
|
if(tp.contains(".")) {
|
||||||
return new PointDescription(tp.substring(0, tp.indexOf('.')), tp.substring(tp.indexOf('.') + 1), nm);
|
pd = new PointDescription(tp.substring(0, tp.indexOf('.')), tp.substring(tp.indexOf('.') + 1), nm);
|
||||||
} else {
|
} else {
|
||||||
return new PointDescription(tp, nm);
|
pd = new PointDescription(tp, nm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
if(pd != null && pd.isLocation() && l != null) {
|
||||||
|
pd.setLat(l.getLatitude());
|
||||||
|
pd.setLon(l.getLongitude());
|
||||||
|
}
|
||||||
|
return pd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -729,7 +729,7 @@ public class GPXUtilities {
|
||||||
writeNotNullText(serializer, "desc", p.desc);
|
writeNotNullText(serializer, "desc", p.desc);
|
||||||
if(p.link != null) {
|
if(p.link != null) {
|
||||||
serializer.startTag(null, "link");
|
serializer.startTag(null, "link");
|
||||||
serializer.attribute(null, "link", p.link);
|
serializer.attribute(null, "href", p.link);
|
||||||
serializer.endTag(null, "link");
|
serializer.endTag(null, "link");
|
||||||
}
|
}
|
||||||
writeNotNullText(serializer, "type", p.category);
|
writeNotNullText(serializer, "type", p.category);
|
||||||
|
|
|
@ -90,9 +90,9 @@ public class OsmAndFormatter {
|
||||||
if (meters >= 100 * mainUnitInMeters) {
|
if (meters >= 100 * mainUnitInMeters) {
|
||||||
return (int) (meters / mainUnitInMeters + 0.5) + " " + ctx.getString(mainUnitStr); //$NON-NLS-1$
|
return (int) (meters / mainUnitInMeters + 0.5) + " " + ctx.getString(mainUnitStr); //$NON-NLS-1$
|
||||||
} else if (meters > 9.99f * mainUnitInMeters) {
|
} else if (meters > 9.99f * mainUnitInMeters) {
|
||||||
return MessageFormat.format("{0,number,#.#} " + ctx.getString(mainUnitStr), ((float) meters) / mainUnitInMeters); //$NON-NLS-1$
|
return MessageFormat.format("{0,number,#.#} " + ctx.getString(mainUnitStr), ((float) meters) / mainUnitInMeters).replace('\n', ' '); //$NON-NLS-1$
|
||||||
} else if (meters > 0.999f * mainUnitInMeters) {
|
} else if (meters > 0.999f * mainUnitInMeters) {
|
||||||
return MessageFormat.format("{0,number,#.##} " + ctx.getString(mainUnitStr), ((float) meters) / mainUnitInMeters); //$NON-NLS-1$
|
return MessageFormat.format("{0,number,#.##} " + ctx.getString(mainUnitStr), ((float) meters) / mainUnitInMeters).replace('\n', ' '); //$NON-NLS-1$
|
||||||
} else {
|
} else {
|
||||||
if (mc == MetricsConstants.KILOMETERS_AND_METERS) {
|
if (mc == MetricsConstants.KILOMETERS_AND_METERS) {
|
||||||
return ((int) (meters + 0.5)) + " " + ctx.getString(R.string.m); //$NON-NLS-1$
|
return ((int) (meters + 0.5)) + " " + ctx.getString(R.string.m); //$NON-NLS-1$
|
||||||
|
|
|
@ -433,7 +433,7 @@ public class OsmandSettings {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean setValue(Object prefs, Integer val) {
|
protected boolean setValue(Object prefs, Integer val) {
|
||||||
return settingsAPI.edit( prefs).putInt(getId(), val).commit();
|
return settingsAPI.edit(prefs).putInt(getId(), val).commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -747,9 +747,6 @@ public class OsmandSettings {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
|
||||||
public final OsmandPreference<Boolean> SHOW_POI_OVER_MAP = new BooleanPreference("show_poi_over_map", false).makeGlobal();
|
|
||||||
|
|
||||||
public final OsmandPreference<Boolean> SHOW_POI_LABEL = new BooleanPreference("show_poi_label", false).makeGlobal();
|
public final OsmandPreference<Boolean> SHOW_POI_LABEL = new BooleanPreference("show_poi_label", false).makeGlobal();
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
|
@ -925,7 +922,7 @@ public class OsmandSettings {
|
||||||
public final OsmandPreference<Boolean> DEBUG_RENDERING_INFO = new BooleanPreference("debug_rendering", false).makeGlobal();
|
public final OsmandPreference<Boolean> DEBUG_RENDERING_INFO = new BooleanPreference("debug_rendering", false).makeGlobal();
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
public final OsmandPreference<Boolean> SHOW_FAVORITES = new BooleanPreference("show_favorites", false).makeGlobal();
|
public final OsmandPreference<Boolean> SHOW_FAVORITES = new BooleanPreference("show_favorites", false).makeGlobal().cache();
|
||||||
|
|
||||||
public final CommonPreference<Boolean> SHOW_ZOOM_BUTTONS_NAVIGATION = new BooleanPreference("show_zoom_buttons_navigation", false).makeProfile().cache();
|
public final CommonPreference<Boolean> SHOW_ZOOM_BUTTONS_NAVIGATION = new BooleanPreference("show_zoom_buttons_navigation", false).makeProfile().cache();
|
||||||
{
|
{
|
||||||
|
@ -1325,10 +1322,10 @@ public class OsmandSettings {
|
||||||
return new LatLon(lat, lon);
|
return new LatLon(lat, lon);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PointDescription getAndClearMapLabelToShow(){
|
public PointDescription getAndClearMapLabelToShow(LatLon l){
|
||||||
String label = settingsAPI.getString(globalPreferences,MAP_LABEL_TO_SHOW, null);
|
String label = settingsAPI.getString(globalPreferences,MAP_LABEL_TO_SHOW, null);
|
||||||
settingsAPI.edit(globalPreferences).remove(MAP_LABEL_TO_SHOW).commit();
|
settingsAPI.edit(globalPreferences).remove(MAP_LABEL_TO_SHOW).commit();
|
||||||
return PointDescription.deserializeFromString(label);
|
return PointDescription.deserializeFromString(label, l);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Object objectToShow;
|
private Object objectToShow;
|
||||||
|
@ -1417,12 +1414,12 @@ public class OsmandSettings {
|
||||||
|
|
||||||
public PointDescription getStartPointDescription() {
|
public PointDescription getStartPointDescription() {
|
||||||
return
|
return
|
||||||
PointDescription.deserializeFromString(settingsAPI.getString(globalPreferences, START_POINT_DESCRIPTION, ""));
|
PointDescription.deserializeFromString(settingsAPI.getString(globalPreferences, START_POINT_DESCRIPTION, ""), getPointToStart());
|
||||||
}
|
}
|
||||||
|
|
||||||
public PointDescription getPointNavigateDescription() {
|
public PointDescription getPointNavigateDescription() {
|
||||||
return
|
return
|
||||||
PointDescription.deserializeFromString(settingsAPI.getString(globalPreferences, POINT_NAVIGATE_DESCRIPTION, ""));
|
PointDescription.deserializeFromString(settingsAPI.getString(globalPreferences, POINT_NAVIGATE_DESCRIPTION, ""), getPointToNavigate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1672,15 +1669,8 @@ public class OsmandSettings {
|
||||||
return settingsAPI.edit(globalPreferences).putString(LAST_SEARCHED_INTERSECTED_STREET, street).commit();
|
return settingsAPI.edit(globalPreferences).putString(LAST_SEARCHED_INTERSECTED_STREET, street).commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String SELECTED_POI_FILTER_FOR_MAP = "selected_poi_filter_for_map"; //$NON-NLS-1$
|
|
||||||
|
|
||||||
public boolean setPoiFilterForMap(String filterId) {
|
public final OsmandPreference<String> SELECTED_POI_FILTER_FOR_MAP = new StringPreference("selected_poi_filter_for_map", null).makeGlobal().cache();
|
||||||
return settingsAPI.edit(globalPreferences).putString(SELECTED_POI_FILTER_FOR_MAP, filterId).commit();
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPoiFilterForMap(){
|
|
||||||
return settingsAPI.getString(globalPreferences,SELECTED_POI_FILTER_FOR_MAP, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final String VOICE_PROVIDER_NOT_USE = "VOICE_PROVIDER_NOT_USE";
|
public static final String VOICE_PROVIDER_NOT_USE = "VOICE_PROVIDER_NOT_USE";
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
|
|
|
@ -102,7 +102,7 @@ public class TargetPointsHelper {
|
||||||
List<LatLon> ips = settings.getIntermediatePoints();
|
List<LatLon> ips = settings.getIntermediatePoints();
|
||||||
List<String> desc = settings.getIntermediatePointDescriptions(ips.size());
|
List<String> desc = settings.getIntermediatePointDescriptions(ips.size());
|
||||||
for(int i = 0; i < ips.size(); i++) {
|
for(int i = 0; i < ips.size(); i++) {
|
||||||
intermediatePoints.add(new TargetPoint(ips.get(i), PointDescription.deserializeFromString(desc.get(i)), i));
|
intermediatePoints.add(new TargetPoint(ips.get(i), PointDescription.deserializeFromString(desc.get(i), ips.get(i)), i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ public class Version {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isDeveloperVersion(OsmandApplication ctx){
|
public static boolean isDeveloperVersion(OsmandApplication ctx){
|
||||||
return "osmand~".equalsIgnoreCase(getAppName(ctx)) ;
|
return "osmand~".equalsIgnoreCase(getAppName(ctx)) || "osmand~f".equalsIgnoreCase(getAppName(ctx)) ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -368,9 +368,6 @@ public class MapActivity extends AccessibleActivity {
|
||||||
settings.APPLICATION_MODE.addListener(applicationModeListener);
|
settings.APPLICATION_MODE.addListener(applicationModeListener);
|
||||||
updateApplicationModeSettings();
|
updateApplicationModeSettings();
|
||||||
|
|
||||||
String filterId = settings.getPoiFilterForMap();
|
|
||||||
PoiLegacyFilter poiFilter = app.getPoiFilters().getFilterById(filterId);
|
|
||||||
mapLayers.getPoiMapLayer().setFilter(poiFilter);
|
|
||||||
|
|
||||||
// if destination point was changed try to recalculate route
|
// if destination point was changed try to recalculate route
|
||||||
TargetPointsHelper targets = app.getTargetPointsHelper();
|
TargetPointsHelper targets = app.getTargetPointsHelper();
|
||||||
|
@ -463,7 +460,7 @@ public class MapActivity extends AccessibleActivity {
|
||||||
public void readLocationToShow() {
|
public void readLocationToShow() {
|
||||||
LatLon cur = new LatLon(mapView.getLatitude(), mapView.getLongitude());
|
LatLon cur = new LatLon(mapView.getLatitude(), mapView.getLongitude());
|
||||||
LatLon latLonToShow = settings.getAndClearMapLocationToShow();
|
LatLon latLonToShow = settings.getAndClearMapLocationToShow();
|
||||||
PointDescription mapLabelToShow = settings.getAndClearMapLabelToShow();
|
PointDescription mapLabelToShow = settings.getAndClearMapLabelToShow(latLonToShow);
|
||||||
Object toShow = settings.getAndClearObjectToShow();
|
Object toShow = settings.getAndClearObjectToShow();
|
||||||
int status = settings.isRouteToPointNavigateAndClear();
|
int status = settings.isRouteToPointNavigateAndClear();
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
|
@ -483,7 +480,7 @@ public class MapActivity extends AccessibleActivity {
|
||||||
if (mapLabelToShow != null) {
|
if (mapLabelToShow != null) {
|
||||||
mapLayers.getContextMenuLayer().setSelectedObject(toShow);
|
mapLayers.getContextMenuLayer().setSelectedObject(toShow);
|
||||||
mapLayers.getContextMenuLayer().setLocation(latLonToShow,
|
mapLayers.getContextMenuLayer().setLocation(latLonToShow,
|
||||||
mapLabelToShow.getFullPlainName(this, latLonToShow.getLatitude(), latLonToShow.getLongitude()));
|
mapLabelToShow.getFullPlainName(this));
|
||||||
}
|
}
|
||||||
if (!latLonToShow.equals(cur)) {
|
if (!latLonToShow.equals(cur)) {
|
||||||
mapView.getAnimatedDraggingThread().startMoving(latLonToShow.getLatitude(),
|
mapView.getAnimatedDraggingThread().startMoving(latLonToShow.getLatitude(),
|
||||||
|
@ -845,8 +842,8 @@ public class MapActivity extends AccessibleActivity {
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
if (intent != null && intent.getData() != null) {
|
if (intent != null && intent.getData() != null) {
|
||||||
Uri data = intent.getData();
|
Uri data = intent.getData();
|
||||||
if ("http".equalsIgnoreCase(data.getScheme()) && "download.osmand.net".equals(data.getHost())
|
if ("http".equalsIgnoreCase(data.getScheme()) && data.getHost() != null && data.getHost().contains("osmand.net") &&
|
||||||
&& "/go".equals(data.getPath())) {
|
data.getPath() != null && data.getPath().startsWith("/go")) {
|
||||||
String lat = data.getQueryParameter("lat");
|
String lat = data.getQueryParameter("lat");
|
||||||
String lon = data.getQueryParameter("lon");
|
String lon = data.getQueryParameter("lon");
|
||||||
if (lat != null && lon != null) {
|
if (lat != null && lon != null) {
|
||||||
|
|
|
@ -46,6 +46,7 @@ import net.osmand.plus.views.PointNavigationLayer;
|
||||||
import net.osmand.plus.views.RouteLayer;
|
import net.osmand.plus.views.RouteLayer;
|
||||||
import net.osmand.plus.views.TransportInfoLayer;
|
import net.osmand.plus.views.TransportInfoLayer;
|
||||||
import net.osmand.plus.views.TransportStopsLayer;
|
import net.osmand.plus.views.TransportStopsLayer;
|
||||||
|
import net.osmand.plus.views.mapwidgets.MapWidgetRegistry;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.AlertDialog.Builder;
|
import android.app.AlertDialog.Builder;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
@ -76,9 +77,15 @@ public class MapActivityLayers {
|
||||||
private ContextMenuLayer contextMenuLayer;
|
private ContextMenuLayer contextMenuLayer;
|
||||||
private MapControlsLayer mapControlsLayer;
|
private MapControlsLayer mapControlsLayer;
|
||||||
private DownloadedRegionsLayer downloadedRegionsLayer;
|
private DownloadedRegionsLayer downloadedRegionsLayer;
|
||||||
|
private MapWidgetRegistry mapWidgetRegistry;
|
||||||
|
|
||||||
public MapActivityLayers(MapActivity activity) {
|
public MapActivityLayers(MapActivity activity) {
|
||||||
this.activity = activity;
|
this.activity = activity;
|
||||||
|
this.mapWidgetRegistry = new MapWidgetRegistry(activity.getMyApplication().getSettings());
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapWidgetRegistry getMapWidgetRegistry() {
|
||||||
|
return mapWidgetRegistry;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OsmandApplication getApplication(){
|
public OsmandApplication getApplication(){
|
||||||
|
@ -117,8 +124,10 @@ public class MapActivityLayers {
|
||||||
// 2. osm bugs layer
|
// 2. osm bugs layer
|
||||||
// 3. poi layer
|
// 3. poi layer
|
||||||
poiMapLayer = new POIMapLayer(activity);
|
poiMapLayer = new POIMapLayer(activity);
|
||||||
|
mapView.addLayer(poiMapLayer, 3);
|
||||||
// 4. favorites layer
|
// 4. favorites layer
|
||||||
favoritesLayer = new FavoritesLayer();
|
favoritesLayer = new FavoritesLayer();
|
||||||
|
mapView.addLayer(favoritesLayer, 4);
|
||||||
// 5. transport layer
|
// 5. transport layer
|
||||||
transportStopsLayer = new TransportStopsLayer();
|
transportStopsLayer = new TransportStopsLayer();
|
||||||
// 5.5 transport info layer
|
// 5.5 transport info layer
|
||||||
|
@ -166,22 +175,6 @@ public class MapActivityLayers {
|
||||||
mapView.removeLayer(transportStopsLayer);
|
mapView.removeLayer(transportStopsLayer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mapView.getLayers().contains(poiMapLayer) != settings.SHOW_POI_OVER_MAP.get()){
|
|
||||||
if(settings.SHOW_POI_OVER_MAP.get()){
|
|
||||||
mapView.addLayer(poiMapLayer, 3);
|
|
||||||
} else {
|
|
||||||
mapView.removeLayer(poiMapLayer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(mapView.getLayers().contains(favoritesLayer) != settings.SHOW_FAVORITES.get()){
|
|
||||||
if(settings.SHOW_FAVORITES.get()){
|
|
||||||
mapView.addLayer(favoritesLayer, 4);
|
|
||||||
} else {
|
|
||||||
mapView.removeLayer(favoritesLayer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
OsmandPlugin.refreshLayers(mapView, activity);
|
OsmandPlugin.refreshLayers(mapView, activity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,12 +269,11 @@ public class MapActivityLayers {
|
||||||
activity.getMyApplication().getSettings().SEARCH_TAB.set(SearchActivity.POI_TAB_INDEX);
|
activity.getMyApplication().getSettings().SEARCH_TAB.set(SearchActivity.POI_TAB_INDEX);
|
||||||
activity.startActivity(search);
|
activity.startActivity(search);
|
||||||
} else {
|
} else {
|
||||||
getApplication().getSettings().setPoiFilterForMap(filterId);
|
|
||||||
pf = poiFilters.getFilterById(filterId);
|
pf = poiFilters.getFilterById(filterId);
|
||||||
if (pf != null) {
|
if (pf != null) {
|
||||||
pf.setFilterByName(pf.getSavedFilterByName());
|
pf.setFilterByName(pf.getSavedFilterByName());
|
||||||
}
|
}
|
||||||
poiMapLayer.setFilter(pf);
|
getApplication().getSettings().SELECTED_POI_FILTER_FOR_MAP.set(filterId);
|
||||||
mapView.refreshMap();
|
mapView.refreshMap();
|
||||||
if(selected != null && selected.length > 0) {
|
if(selected != null && selected.length > 0) {
|
||||||
selected[0] = pf;
|
selected[0] = pf;
|
||||||
|
|
|
@ -11,6 +11,7 @@ import net.osmand.plus.activities.search.SearchActivity.SearchActivityChild;
|
||||||
import net.osmand.plus.dialogs.DirectionsDialogs;
|
import net.osmand.plus.dialogs.DirectionsDialogs;
|
||||||
import net.osmand.plus.dialogs.FavoriteDialogs;
|
import net.osmand.plus.dialogs.FavoriteDialogs;
|
||||||
import net.osmand.plus.helpers.AndroidUiHelper;
|
import net.osmand.plus.helpers.AndroidUiHelper;
|
||||||
|
import net.osmand.util.Algorithms;
|
||||||
import net.osmand.util.MapUtils;
|
import net.osmand.util.MapUtils;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
@ -178,27 +179,20 @@ public class NavigatePointFragment extends Fragment implements SearchActivityChi
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
//Hardy: onResume() code is needed so that search origin is properly reflected in tab contents when origin has been changed on one tab, then tab is changed to another one.
|
|
||||||
location = null;
|
|
||||||
OsmandApplication app = (OsmandApplication) getActivity().getApplication();
|
OsmandApplication app = (OsmandApplication) getActivity().getApplication();
|
||||||
//Intent intent = getSherlockActivity().getIntent();
|
|
||||||
//if (intent != null) {
|
LatLon loc = null;
|
||||||
// if (intent.hasExtra(SearchActivity.SEARCH_LAT) && intent.hasExtra(SearchActivity.SEARCH_LON)) {
|
if (getActivity() instanceof SearchActivity) {
|
||||||
// double lat = intent.getDoubleExtra(SearchActivity.SEARCH_LAT, 0);
|
loc = ((SearchActivity) getActivity()).getSearchPoint();
|
||||||
// double lon = intent.getDoubleExtra(SearchActivity.SEARCH_LON, 0);
|
|
||||||
// if (lat != 0 || lon != 0) {
|
|
||||||
// location = new LatLon(lat, lon);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
if (location == null && getActivity() instanceof SearchActivity) {
|
|
||||||
location = ((SearchActivity) getActivity()).getSearchPoint();
|
|
||||||
}
|
}
|
||||||
if (location == null) {
|
if (loc == null) {
|
||||||
location = app.getSettings().getLastKnownMapLocation();
|
loc = app.getSettings().getLastKnownMapLocation();
|
||||||
}
|
}
|
||||||
|
if(!Algorithms.objectEquals(loc, location)) {
|
||||||
|
location = loc;
|
||||||
locationUpdate(location);
|
locationUpdate(location);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void locationUpdate(LatLon l) {
|
public void locationUpdate(LatLon l) {
|
||||||
|
@ -385,19 +379,20 @@ public class NavigatePointFragment extends Fragment implements SearchActivityChi
|
||||||
LatLon loc = parseLocation();
|
LatLon loc = parseLocation();
|
||||||
double lat = loc.getLatitude();
|
double lat = loc.getLatitude();
|
||||||
double lon = loc.getLongitude();
|
double lon = loc.getLongitude();
|
||||||
|
PointDescription pd = new PointDescription(lat, lon);
|
||||||
if(mode == ADD_TO_FAVORITE) {
|
if(mode == ADD_TO_FAVORITE) {
|
||||||
Bundle b = new Bundle();
|
Bundle b = new Bundle();
|
||||||
Dialog dlg = FavoriteDialogs.createAddFavouriteDialog(getActivity(), b);
|
Dialog dlg = FavoriteDialogs.createAddFavouriteDialog(getActivity(), b);
|
||||||
dlg.show();
|
dlg.show();
|
||||||
FavoriteDialogs.prepareAddFavouriteDialog(getActivity(), dlg, b, lat, lon, PointDescription.LOCATION_POINT);
|
FavoriteDialogs.prepareAddFavouriteDialog(getActivity(), dlg, b, lat, lon, pd);
|
||||||
} else if (mode == NAVIGATE_TO) {
|
} else if (mode == NAVIGATE_TO) {
|
||||||
DirectionsDialogs.directionsToDialogAndLaunchMap(getActivity(), lat, lon, PointDescription.LOCATION_POINT);
|
DirectionsDialogs.directionsToDialogAndLaunchMap(getActivity(), lat, lon, pd);
|
||||||
} else if (mode == ADD_WAYPOINT) {
|
} else if (mode == ADD_WAYPOINT) {
|
||||||
DirectionsDialogs.addWaypointDialogAndLaunchMap(getActivity(), lat, lon, PointDescription.LOCATION_POINT);
|
DirectionsDialogs.addWaypointDialogAndLaunchMap(getActivity(), lat, lon, pd);
|
||||||
} else if (mode == SHOW_ON_MAP){
|
} else if (mode == SHOW_ON_MAP){
|
||||||
OsmandApplication app = (OsmandApplication) getActivity().getApplication();
|
OsmandApplication app = (OsmandApplication) getActivity().getApplication();
|
||||||
app.getSettings().setMapLocationToShow(lat, lon, Math.max(12, app.getSettings().getLastKnownMapZoom()),
|
app.getSettings().setMapLocationToShow(lat, lon, Math.max(12, app.getSettings().getLastKnownMapZoom()),
|
||||||
PointDescription.LOCATION_POINT);
|
pd);
|
||||||
MapActivity.launchMapActivityMoveToTop(getActivity());
|
MapActivity.launchMapActivityMoveToTop(getActivity());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,8 +70,7 @@ public class SettingsActivity extends SettingsBaseActivity {
|
||||||
startActivity(new Intent(this, SettingsNavigationActivity.class));
|
startActivity(new Intent(this, SettingsNavigationActivity.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((Version.getBuildAppEdition(getMyApplication()).length() > 0
|
if ((Version.isDeveloperVersion(getMyApplication())) &&
|
||||||
|| Version.isDeveloperVersion(getMyApplication())) &&
|
|
||||||
OsmandPlugin.getEnabledPlugin(OsmandDevelopmentPlugin.class) != null){
|
OsmandPlugin.getEnabledPlugin(OsmandDevelopmentPlugin.class) != null){
|
||||||
version = new Preference(this);
|
version = new Preference(this);
|
||||||
version.setOnPreferenceClickListener(this);
|
version.setOnPreferenceClickListener(this);
|
||||||
|
|
|
@ -453,8 +453,12 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
||||||
|
|
||||||
|
|
||||||
private void warnAboutChangingStorage(final String newValue) {
|
private void warnAboutChangingStorage(final String newValue) {
|
||||||
final String newDir = newValue != null ? newValue.trim() : newValue;
|
String newDir = newValue != null ? newValue.trim() : newValue;
|
||||||
File path = new File(newDir);
|
if(!newDir.replace('/', ' ').trim().
|
||||||
|
toLowerCase().endsWith(IndexConstants.APP_DIR.replace('/', ' ').trim())) {
|
||||||
|
newDir += "/" +IndexConstants.APP_DIR;
|
||||||
|
}
|
||||||
|
final File path = new File(newDir);
|
||||||
path.mkdirs();
|
path.mkdirs();
|
||||||
if (!path.canRead() || !path.exists()) {
|
if (!path.canRead() || !path.exists()) {
|
||||||
AccessibleToast.makeText(this, R.string.specified_dir_doesnt_exist, Toast.LENGTH_LONG).show();
|
AccessibleToast.makeText(this, R.string.specified_dir_doesnt_exist, Toast.LENGTH_LONG).show();
|
||||||
|
@ -467,12 +471,11 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
MoveFilesToDifferentDirectory task =
|
MoveFilesToDifferentDirectory task =
|
||||||
new MoveFilesToDifferentDirectory(SettingsGeneralActivity.this,
|
new MoveFilesToDifferentDirectory(SettingsGeneralActivity.this,
|
||||||
new File(settings.getExternalStorageDirectory(), IndexConstants.APP_DIR), new File(newDir,
|
settings.getExternalStorageDirectory(), path);
|
||||||
IndexConstants.APP_DIR));
|
|
||||||
task.setRunOnSuccess(new Runnable() {
|
task.setRunOnSuccess(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
updateSettingsToNewDir(newDir);
|
updateSettingsToNewDir(path.getParentFile().getAbsolutePath());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
task.execute();
|
task.execute();
|
||||||
|
@ -482,7 +485,7 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
updateSettingsToNewDir(newDir);
|
updateSettingsToNewDir(path.getParentFile().getAbsolutePath());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.setNegativeButton(R.string.shared_string_cancel, null);
|
builder.setNegativeButton(R.string.shared_string_cancel, null);
|
||||||
|
@ -490,7 +493,6 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateSettingsToNewDir(final String newDir) {
|
private void updateSettingsToNewDir(final String newDir) {
|
||||||
// TODO v19
|
|
||||||
// edit the preference
|
// edit the preference
|
||||||
settings.setExternalStorageDirectoryPre19(newDir);
|
settings.setExternalStorageDirectoryPre19(newDir);
|
||||||
getMyApplication().getResourceManager().resetStoreDirectory();
|
getMyApplication().getResourceManager().resetStoreDirectory();
|
||||||
|
|
|
@ -14,14 +14,16 @@ import android.support.v4.view.ViewPager;
|
||||||
public class TabActivity extends ActionBarProgressActivity {
|
public class TabActivity extends ActionBarProgressActivity {
|
||||||
|
|
||||||
public TabItem getTabIndicator(int resId, Class<?> fragment){
|
public TabItem getTabIndicator(int resId, Class<?> fragment){
|
||||||
return new TabItem(getString(resId), fragment);
|
return new TabItem(resId, getString(resId), fragment);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class TabItem {
|
public static class TabItem {
|
||||||
public final CharSequence mTitle;
|
public final CharSequence mTitle;
|
||||||
public final Class<?> fragment;
|
public final Class<?> fragment;
|
||||||
|
public final int resId;
|
||||||
|
|
||||||
public TabItem(CharSequence mTitle, Class<?> fragment) {
|
public TabItem(int resId, CharSequence mTitle, Class<?> fragment) {
|
||||||
|
this.resId = resId;
|
||||||
this.mTitle = mTitle;
|
this.mTitle = mTitle;
|
||||||
this.fragment = fragment;
|
this.fragment = fragment;
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,6 @@ public class TrackActivity extends TabActivity {
|
||||||
|
|
||||||
setViewPagerAdapter(mViewPager, new ArrayList<TabActivity.TabItem>());
|
setViewPagerAdapter(mViewPager, new ArrayList<TabActivity.TabItem>());
|
||||||
mSlidingTabLayout.setViewPager(mViewPager);
|
mSlidingTabLayout.setViewPager(mViewPager);
|
||||||
|
|
||||||
new AsyncTask<Void, Void, GPXFile>() {
|
new AsyncTask<Void, Void, GPXFile>() {
|
||||||
|
|
||||||
protected void onPreExecute() {
|
protected void onPreExecute() {
|
||||||
|
@ -114,6 +113,9 @@ public class TrackActivity extends TabActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<GpxSelectionHelper.GpxDisplayGroup> getResult() {
|
public List<GpxSelectionHelper.GpxDisplayGroup> getResult() {
|
||||||
|
if(result == null) {
|
||||||
|
return new ArrayList<GpxSelectionHelper.GpxDisplayGroup>();
|
||||||
|
}
|
||||||
if (result.modifiedTime != modifiedTime) {
|
if (result.modifiedTime != modifiedTime) {
|
||||||
modifiedTime = result.modifiedTime;
|
modifiedTime = result.modifiedTime;
|
||||||
GpxSelectionHelper selectedGpxHelper = ((OsmandApplication) getApplication()).getSelectedGpxHelper();
|
GpxSelectionHelper selectedGpxHelper = ((OsmandApplication) getApplication()).getSelectedGpxHelper();
|
||||||
|
@ -171,11 +173,11 @@ public class TrackActivity extends TabActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isHavingWayPoints(){
|
boolean isHavingWayPoints(){
|
||||||
return getGpx().hasWptPt();
|
return getGpx() != null && getGpx().hasWptPt();
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isHavingRoutePoints(){
|
boolean isHavingRoutePoints(){
|
||||||
return getGpx().hasRtePt();
|
return getGpx() != null && getGpx().hasRtePt();
|
||||||
}
|
}
|
||||||
|
|
||||||
public GPXFile getGpx() {
|
public GPXFile getGpx() {
|
||||||
|
|
|
@ -168,7 +168,7 @@ public class GeoIntentActivity extends OsmandListActivity {
|
||||||
} else {
|
} else {
|
||||||
distanceLabel.setText(""); //$NON-NLS-1$
|
distanceLabel.setText(""); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
label.setText(getString(model).getFullPlainName(getApplication(), 0, 0));
|
label.setText(getString(model).getFullPlainName(getApplication()));
|
||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,7 +253,7 @@ public class SearchHistoryFragment extends ListFragment implements SearchActivit
|
||||||
}
|
}
|
||||||
distanceText.setText(distance);
|
distanceText.setText(distance);
|
||||||
PointDescription pd = historyEntry.getName();
|
PointDescription pd = historyEntry.getName();
|
||||||
nameText.setText(pd.getSimpleName(activity, historyEntry.getLat(), historyEntry.getLon(), false), BufferType.SPANNABLE);
|
nameText.setText(pd.getSimpleName(activity, false), BufferType.SPANNABLE);
|
||||||
ImageView icon = ((ImageView) row.findViewById(R.id.icon));
|
ImageView icon = ((ImageView) row.findViewById(R.id.icon));
|
||||||
|
|
||||||
if (historyEntry.getName().isAddress()) {
|
if (historyEntry.getName().isAddress()) {
|
||||||
|
|
|
@ -162,8 +162,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
public boolean onMenuItemClick(MenuItem item) {
|
public boolean onMenuItemClick(MenuItem item) {
|
||||||
OsmandSettings settings = app.getSettings();
|
OsmandSettings settings = app.getSettings();
|
||||||
filter.setFilterByName(searchFilter.getText().toString().trim());
|
filter.setFilterByName(searchFilter.getText().toString().trim());
|
||||||
settings.setPoiFilterForMap(filter.getFilterId());
|
settings.SELECTED_POI_FILTER_FOR_MAP.set(filter.getFilterId());
|
||||||
settings.SHOW_POI_OVER_MAP.set(true);
|
|
||||||
if (location != null) {
|
if (location != null) {
|
||||||
settings.setMapLocationToShow(location.getLatitude(), location.getLongitude(), 15);
|
settings.setMapLocationToShow(location.getLatitude(), location.getLongitude(), 15);
|
||||||
}
|
}
|
||||||
|
@ -410,6 +409,9 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
} else {
|
} else {
|
||||||
this.filter.updateTypesToAccept(custom);
|
this.filter.updateTypesToAccept(custom);
|
||||||
}
|
}
|
||||||
|
filter.clearPreviousZoom();
|
||||||
|
// run query again
|
||||||
|
runNewSearchQuery(location, NEW_SEARCH_INIT);
|
||||||
}
|
}
|
||||||
if (filter == null || filter.isEmpty()) {
|
if (filter == null || filter.isEmpty()) {
|
||||||
finish();
|
finish();
|
||||||
|
|
|
@ -44,6 +44,7 @@ public class SearchRegionByNameActivity extends SearchByNameAbstractActivity<Reg
|
||||||
protected LatLon getLocation(RegionAddressRepository item) {
|
protected LatLon getLocation(RegionAddressRepository item) {
|
||||||
return item.getEstimatedRegionCenter();
|
return item.getEstimatedRegionCenter();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
|
@ -83,6 +83,7 @@ import android.widget.Toast;
|
||||||
|
|
||||||
public class AudioVideoNotesPlugin extends OsmandPlugin {
|
public class AudioVideoNotesPlugin extends OsmandPlugin {
|
||||||
|
|
||||||
|
public static final int NOTES_TAB = R.string.notes;
|
||||||
public static final String ID = "osmand.audionotes";
|
public static final String ID = "osmand.audionotes";
|
||||||
public static final String THREEGP_EXTENSION = "3gp";
|
public static final String THREEGP_EXTENSION = "3gp";
|
||||||
public static final String MPEG4_EXTENSION = "mp4";
|
public static final String MPEG4_EXTENSION = "mp4";
|
||||||
|
@ -133,6 +134,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
||||||
private MediaRecorder mediaRec;
|
private MediaRecorder mediaRec;
|
||||||
private File lastTakingPhoto;
|
private File lastTakingPhoto;
|
||||||
|
|
||||||
|
private final static char SPLIT_DESC = ' ';
|
||||||
public static class Recording {
|
public static class Recording {
|
||||||
public Recording(File f) {
|
public Recording(File f) {
|
||||||
this.file = f;
|
this.file = f;
|
||||||
|
@ -175,17 +177,11 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean setName(String name) {
|
public boolean setName(String name) {
|
||||||
File directory = file.getParentFile();
|
File directory = file.getParentFile();
|
||||||
String fileName = getFileName();
|
String fileName = getFileName();
|
||||||
final String hashAndExtension;
|
File to = new File(directory, name + SPLIT_DESC + getOtherName(fileName));
|
||||||
int hashInd = fileName.lastIndexOf('_');
|
|
||||||
if (hashInd == -1) {
|
|
||||||
hashAndExtension = "_" + fileName;
|
|
||||||
} else {
|
|
||||||
hashAndExtension = fileName.substring(hashInd, fileName.length());
|
|
||||||
}
|
|
||||||
File to = new File(directory, name+hashAndExtension);
|
|
||||||
if (file.renameTo(to)) {
|
if (file.renameTo(to)) {
|
||||||
file = to;
|
file = to;
|
||||||
return true;
|
return true;
|
||||||
|
@ -197,12 +193,34 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
||||||
return file.getName();
|
return file.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getDescriptionName(String fileName) {
|
||||||
|
int hashInd = fileName.lastIndexOf(SPLIT_DESC);
|
||||||
|
//backward compatibility
|
||||||
|
if( fileName.indexOf('.') - fileName.indexOf('_') > 12 &&
|
||||||
|
hashInd < fileName.indexOf('_')) {
|
||||||
|
hashInd = fileName.indexOf('_');
|
||||||
|
}
|
||||||
|
if(hashInd == -1) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return fileName.substring(0, hashInd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOtherName(String fileName) {
|
||||||
|
String descriptionName = getDescriptionName(fileName);
|
||||||
|
if(descriptionName != null) {
|
||||||
|
return fileName.substring(descriptionName.length() + 1); // SPLIT_DESC
|
||||||
|
} else {
|
||||||
|
return fileName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public String getName(Context ctx) {
|
public String getName(Context ctx) {
|
||||||
String fileName = file.getName();
|
String fileName = file.getName();
|
||||||
|
String desc = getDescriptionName(fileName);
|
||||||
int hashInd = fileName.lastIndexOf('_');
|
if (desc != null) {
|
||||||
if (hashInd != -1) {
|
return desc;
|
||||||
return fileName.substring(0, hashInd);
|
|
||||||
} else if (this.isAudio()) {
|
} else if (this.isAudio()) {
|
||||||
return ctx.getResources().getString(R.string.shared_string_audio);
|
return ctx.getResources().getString(R.string.shared_string_audio);
|
||||||
} else if (this.isVideo()) {
|
} else if (this.isVideo()) {
|
||||||
|
@ -605,7 +623,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
||||||
f.mkdirs();
|
f.mkdirs();
|
||||||
File fl;
|
File fl;
|
||||||
do {
|
do {
|
||||||
fl = new File(f, basename + "-" + (k++) + "." + ext);
|
fl = new File(f, basename + "." + (k++) + "." + ext);
|
||||||
} while (fl.exists());
|
} while (fl.exists());
|
||||||
return fl;
|
return fl;
|
||||||
}
|
}
|
||||||
|
@ -977,9 +995,9 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
||||||
@Override
|
@Override
|
||||||
public void addMyPlacesTab(FavoritesActivity favoritesActivity, List<TabItem> mTabs, Intent intent) {
|
public void addMyPlacesTab(FavoritesActivity favoritesActivity, List<TabItem> mTabs, Intent intent) {
|
||||||
if (getAllRecordings().size() > 0) {
|
if (getAllRecordings().size() > 0) {
|
||||||
mTabs.add(favoritesActivity.getTabIndicator(R.string.notes, NotesFragment.class));
|
mTabs.add(favoritesActivity.getTabIndicator(NOTES_TAB, NotesFragment.class));
|
||||||
if (intent != null && "AUDIO".equals(intent.getStringExtra("TAB"))) {
|
if (intent != null && "AUDIO".equals(intent.getStringExtra("TAB"))) {
|
||||||
app.getSettings().FAVORITES_TAB.set(FavoritesActivity.NOTES_TAB);
|
app.getSettings().FAVORITES_TAB.set(NOTES_TAB);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -990,17 +1008,14 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Recording r = new Recording(f);
|
Recording r = new Recording(f);
|
||||||
String encodeName = f.getName();
|
String fileName = f.getName();
|
||||||
int i = encodeName.lastIndexOf('_');
|
String otherName = r.getOtherName(fileName);
|
||||||
|
int i = otherName.indexOf('.');
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
encodeName = encodeName.substring(i + 1);
|
otherName = otherName.substring(0, i);
|
||||||
}
|
|
||||||
i = encodeName.indexOf('.');
|
|
||||||
if (i > 0) {
|
|
||||||
encodeName = encodeName.substring(0, i);
|
|
||||||
}
|
}
|
||||||
r.file = f;
|
r.file = f;
|
||||||
GeoParsedPoint geo = MapUtils.decodeShortLinkString(encodeName);
|
GeoParsedPoint geo = MapUtils.decodeShortLinkString(otherName);
|
||||||
r.lat = geo.getLatitude();
|
r.lat = geo.getLatitude();
|
||||||
r.lon = geo.getLongitude();
|
r.lon = geo.getLongitude();
|
||||||
Float heading = app.getLocationProvider().getHeading();
|
Float heading = app.getLocationProvider().getHeading();
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class DashAudioVideoNotesFragment extends DashBaseFragment {
|
||||||
(view.findViewById(R.id.show_all)).setOnClickListener(new View.OnClickListener() {
|
(view.findViewById(R.id.show_all)).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
startFavoritesActivity(FavoritesActivity.NOTES_TAB);
|
startFavoritesActivity(AudioVideoNotesPlugin.NOTES_TAB);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return view;
|
return view;
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class DashFavoritesFragment extends DashLocationFragment {
|
||||||
(view.findViewById(R.id.show_all)).setOnClickListener(new View.OnClickListener() {
|
(view.findViewById(R.id.show_all)).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
startFavoritesActivity(FavoritesActivity.FAVORITES_TAB);
|
startFavoritesActivity(FavoritesActivity.FAV_TAB);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return view;
|
return view;
|
||||||
|
|
|
@ -31,6 +31,7 @@ import net.osmand.plus.osmo.DashOsMoFragment;
|
||||||
import net.osmand.plus.parkingpoint.DashParkingFragment;
|
import net.osmand.plus.parkingpoint.DashParkingFragment;
|
||||||
import net.osmand.plus.routing.RoutingHelper;
|
import net.osmand.plus.routing.RoutingHelper;
|
||||||
import net.osmand.plus.views.DownloadedRegionsLayer;
|
import net.osmand.plus.views.DownloadedRegionsLayer;
|
||||||
|
import net.osmand.plus.views.MapInfoLayer;
|
||||||
import net.osmand.plus.views.OsmandMapTileView;
|
import net.osmand.plus.views.OsmandMapTileView;
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
@ -422,8 +423,8 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks {
|
||||||
} else {
|
} else {
|
||||||
scrollView.setVisibility(View.GONE);
|
scrollView.setVisibility(View.GONE);
|
||||||
listViewLayout.setVisibility(View.VISIBLE);
|
listViewLayout.setVisibility(View.VISIBLE);
|
||||||
if(listView instanceof ObservableListView) {
|
if (listView instanceof ObservableListView) {
|
||||||
onScrollChanged(((ObservableListView)listView).getScrollY(), false, false);
|
onScrollChanged(((ObservableListView) listView).getScrollY(), false, false);
|
||||||
}
|
}
|
||||||
if(refresh) {
|
if(refresh) {
|
||||||
refreshContent(false);
|
refreshContent(false);
|
||||||
|
@ -471,7 +472,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (DashboardType.CONFIGURE_SCREEN == visibleType) {
|
if (DashboardType.CONFIGURE_SCREEN == visibleType) {
|
||||||
cm = mapActivity.getMapLayers().getMapInfoLayer().getViewConfigureMenuAdapter();
|
cm = mapActivity.getMapLayers().getMapWidgetRegistry().getViewConfigureMenuAdapter(mapActivity);
|
||||||
} else if(DashboardType.CONFIGURE_MAP == visibleType) {
|
} else if(DashboardType.CONFIGURE_MAP == visibleType) {
|
||||||
cm = new ConfigureMapMenu().createListAdapter(mapActivity);
|
cm = new ConfigureMapMenu().createListAdapter(mapActivity);
|
||||||
} else if(DashboardType.LIST_MENU == visibleType) {
|
} else if(DashboardType.LIST_MENU == visibleType) {
|
||||||
|
@ -779,8 +780,10 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks {
|
||||||
public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) {
|
public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) {
|
||||||
// Translate list background
|
// Translate list background
|
||||||
if (portrait) {
|
if (portrait) {
|
||||||
|
if(listBackgroundView != null) {
|
||||||
setTranslationY(listBackgroundView, Math.max(0, -scrollY + mFlexibleSpaceImageHeight));
|
setTranslationY(listBackgroundView, Math.max(0, -scrollY + mFlexibleSpaceImageHeight));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (portrait) {
|
if (portrait) {
|
||||||
setTranslationY(toolbar, Math.min(0, -scrollY + mFlexibleSpaceImageHeight - mFlexibleBlurSpaceHeight));
|
setTranslationY(toolbar, Math.min(0, -scrollY + mFlexibleSpaceImageHeight - mFlexibleBlurSpaceHeight));
|
||||||
}
|
}
|
||||||
|
@ -839,7 +842,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks {
|
||||||
private void updateListAdapter(ArrayAdapter<?> listAdapter, OnItemClickListener listener) {
|
private void updateListAdapter(ArrayAdapter<?> listAdapter, OnItemClickListener listener) {
|
||||||
this.listAdapter = listAdapter;
|
this.listAdapter = listAdapter;
|
||||||
this.listAdapterOnClickListener = listener;
|
this.listAdapterOnClickListener = listener;
|
||||||
if(this.listView != null) {
|
if (this.listView != null) {
|
||||||
listView.setAdapter(listAdapter);
|
listView.setAdapter(listAdapter);
|
||||||
if(!portrait) {
|
if(!portrait) {
|
||||||
listView.setOnItemClickListener(this.listAdapterOnClickListener);
|
listView.setOnItemClickListener(this.listAdapterOnClickListener);
|
||||||
|
|
|
@ -17,10 +17,12 @@ import net.osmand.plus.OsmandSettings;
|
||||||
import net.osmand.plus.OsmandSettings.CommonPreference;
|
import net.osmand.plus.OsmandSettings.CommonPreference;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
|
import net.osmand.plus.activities.PluginActivity;
|
||||||
import net.osmand.plus.activities.SettingsActivity;
|
import net.osmand.plus.activities.SettingsActivity;
|
||||||
import net.osmand.plus.activities.TransportRouteHelper;
|
import net.osmand.plus.activities.TransportRouteHelper;
|
||||||
import net.osmand.plus.dashboard.DashboardOnMap.DashboardType;
|
import net.osmand.plus.dashboard.DashboardOnMap.DashboardType;
|
||||||
import net.osmand.plus.poi.PoiLegacyFilter;
|
import net.osmand.plus.poi.PoiLegacyFilter;
|
||||||
|
import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin;
|
||||||
import net.osmand.plus.render.RendererRegistry;
|
import net.osmand.plus.render.RendererRegistry;
|
||||||
import net.osmand.plus.views.OsmandMapTileView;
|
import net.osmand.plus.views.OsmandMapTileView;
|
||||||
import net.osmand.plus.views.corenative.NativeCoreContext;
|
import net.osmand.plus.views.corenative.NativeCoreContext;
|
||||||
|
@ -33,6 +35,7 @@ import android.app.AlertDialog;
|
||||||
import android.app.AlertDialog.Builder;
|
import android.app.AlertDialog.Builder;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
import android.content.Intent;
|
||||||
import android.content.DialogInterface.OnMultiChoiceClickListener;
|
import android.content.DialogInterface.OnMultiChoiceClickListener;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
|
@ -92,7 +95,7 @@ public class ConfigureMapMenu {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onRowItemClick(ArrayAdapter<?> adapter, View view, int itemId, int pos) {
|
public boolean onRowItemClick(ArrayAdapter<?> adapter, View view, int itemId, int pos) {
|
||||||
if(itemId == R.string.layer_poi && cm.getSelection(pos) == 1) {
|
if(itemId == R.string.layer_poi) {
|
||||||
selectPOILayer(ma.getMyApplication().getSettings());
|
selectPOILayer(ma.getMyApplication().getSettings());
|
||||||
return false;
|
return false;
|
||||||
} else if(itemId == R.string.layer_gpx_layer && cm.getSelection(pos) == 1) {
|
} else if(itemId == R.string.layer_gpx_layer && cm.getSelection(pos) == 1) {
|
||||||
|
@ -107,13 +110,18 @@ public class ConfigureMapMenu {
|
||||||
public boolean onContextMenuClick(final ArrayAdapter<?> adapter, int itemId, final int pos, boolean isChecked) {
|
public boolean onContextMenuClick(final ArrayAdapter<?> adapter, int itemId, final int pos, boolean isChecked) {
|
||||||
final OsmandSettings settings = ma.getMyApplication().getSettings();
|
final OsmandSettings settings = ma.getMyApplication().getSettings();
|
||||||
if (itemId == R.string.layer_poi) {
|
if (itemId == R.string.layer_poi) {
|
||||||
settings.setPoiFilterForMap(null);
|
settings.SELECTED_POI_FILTER_FOR_MAP.set(null);
|
||||||
ma.getMapLayers().getPoiMapLayer().setFilter(null);
|
|
||||||
settings.SHOW_POI_OVER_MAP.set(isChecked);
|
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
selectPOILayer(settings);
|
selectPOILayer(settings);
|
||||||
}
|
}
|
||||||
|
} else if (itemId == R.string.layer_map) {
|
||||||
|
if(OsmandPlugin.getEnabledPlugin(OsmandRasterMapsPlugin.class) == null) {
|
||||||
|
Intent intent = new Intent(ma, PluginActivity.class);
|
||||||
|
intent.putExtra(PluginActivity.EXTRA_PLUGIN_ID, OsmandRasterMapsPlugin.ID);
|
||||||
|
ma.startActivity(intent);
|
||||||
|
} else {
|
||||||
|
ma.getMapLayers().selectMapLayer(ma.getMapView());
|
||||||
|
}
|
||||||
} else if (itemId == R.string.layer_amenity_label) {
|
} else if (itemId == R.string.layer_amenity_label) {
|
||||||
settings.SHOW_POI_LABEL.set(isChecked);
|
settings.SHOW_POI_LABEL.set(isChecked);
|
||||||
} else if (itemId == R.string.shared_string_favorites) {
|
} else if (itemId == R.string.shared_string_favorites) {
|
||||||
|
@ -146,9 +154,6 @@ public class ConfigureMapMenu {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDismiss(DialogInterface dialog) {
|
public void onDismiss(DialogInterface dialog) {
|
||||||
if(selected[0] == null) {
|
|
||||||
settings.SHOW_POI_OVER_MAP.set(selected[0] != null);
|
|
||||||
}
|
|
||||||
ma.getDashboard().refreshContent(true);
|
ma.getDashboard().refreshContent(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -161,8 +166,10 @@ public class ConfigureMapMenu {
|
||||||
LayerMenuListener l = new LayerMenuListener(activity, adapter);
|
LayerMenuListener l = new LayerMenuListener(activity, adapter);
|
||||||
adapter.item(R.string.shared_string_show).setCategory(true).layout(R.layout.drawer_list_sub_header).reg();
|
adapter.item(R.string.shared_string_show).setCategory(true).layout(R.layout.drawer_list_sub_header).reg();
|
||||||
// String appMode = " [" + settings.getApplicationMode().toHumanString(view.getApplication()) +"] ";
|
// String appMode = " [" + settings.getApplicationMode().toHumanString(view.getApplication()) +"] ";
|
||||||
adapter.item(R.string.layer_poi).selected(settings.SHOW_POI_OVER_MAP.get() ? 1 : 0)
|
adapter.item(R.string.layer_poi).selected(settings.SELECTED_POI_FILTER_FOR_MAP.get() != null ? 1 : 0)
|
||||||
.iconColor(R.drawable.ic_action_info_dark).listen(l).reg();
|
.iconColor(R.drawable.ic_action_info_dark).listen(l).reg();
|
||||||
|
adapter.item(R.string.layer_map).iconColor(R.drawable.ic_world_globe_dark)
|
||||||
|
.listen(l).reg();
|
||||||
adapter.item(R.string.layer_amenity_label).selected(settings.SHOW_POI_LABEL.get() ? 1 : 0)
|
adapter.item(R.string.layer_amenity_label).selected(settings.SHOW_POI_LABEL.get() ? 1 : 0)
|
||||||
.iconColor(R.drawable.ic_action_text_dark).listen(l).reg();
|
.iconColor(R.drawable.ic_action_text_dark).listen(l).reg();
|
||||||
adapter.item(R.string.shared_string_favorites).selected(settings.SHOW_FAVORITES.get() ? 1 : 0)
|
adapter.item(R.string.shared_string_favorites).selected(settings.SHOW_FAVORITES.get() ? 1 : 0)
|
||||||
|
@ -221,6 +228,7 @@ public class ConfigureMapMenu {
|
||||||
AccessibleToast.makeText(app, R.string.renderer_load_exception, Toast.LENGTH_SHORT).show();
|
AccessibleToast.makeText(app, R.string.renderer_load_exception, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
adapter.setItemDescription(pos, getRenderDescr(activity));
|
adapter.setItemDescription(pos, getRenderDescr(activity));
|
||||||
|
activity.getDashboard().refreshContent(true);
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,11 +38,11 @@ public class BaseDownloadActivity extends ActionBarProgressActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
settings = ((OsmandApplication) getApplication()).getSettings();
|
settings = ((OsmandApplication) getApplication()).getSettings();
|
||||||
if (downloadListIndexThread == null) {
|
if (downloadListIndexThread == null) {
|
||||||
downloadListIndexThread = new DownloadIndexesThread(this);
|
downloadListIndexThread = new DownloadIndexesThread(this);
|
||||||
}
|
}
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
// Having the next line here causes bug AND-197: The storage folder dialogue popped up upon EVERY app startup, because the map list is not indexed yet.
|
// Having the next line here causes bug AND-197: The storage folder dialogue popped up upon EVERY app startup, because the map list is not indexed yet.
|
||||||
// Hence line moved to updateDownloads() now.
|
// Hence line moved to updateDownloads() now.
|
||||||
// prepareDownloadDirectory();
|
// prepareDownloadDirectory();
|
||||||
|
|
|
@ -99,9 +99,12 @@ public class DownloadActivity extends BaseDownloadActivity {
|
||||||
ViewPager viewPager = (ViewPager) findViewById(R.id.pager);
|
ViewPager viewPager = (ViewPager) findViewById(R.id.pager);
|
||||||
PagerSlidingTabStrip mSlidingTabLayout = (PagerSlidingTabStrip) findViewById(R.id.sliding_tabs);
|
PagerSlidingTabStrip mSlidingTabLayout = (PagerSlidingTabStrip) findViewById(R.id.sliding_tabs);
|
||||||
|
|
||||||
mTabs.add(new TabActivity.TabItem(getString(R.string.download_tab_local), LocalIndexesFragment.class));
|
mTabs.add(new TabActivity.TabItem(R.string.download_tab_local,
|
||||||
mTabs.add(new TabActivity.TabItem(getString(R.string.download_tab_downloads), DownloadIndexFragment.class));
|
getString(R.string.download_tab_local), LocalIndexesFragment.class));
|
||||||
mTabs.add(new TabActivity.TabItem(getString(R.string.download_tab_updates), UpdatesIndexFragment.class));
|
mTabs.add(new TabActivity.TabItem(R.string.download_tab_downloads,
|
||||||
|
getString(R.string.download_tab_downloads), DownloadIndexFragment.class));
|
||||||
|
mTabs.add(new TabActivity.TabItem(R.string.download_tab_updates,
|
||||||
|
getString(R.string.download_tab_updates), UpdatesIndexFragment.class));
|
||||||
|
|
||||||
viewPager.setAdapter(new TabActivity.OsmandFragmentPagerAdapter(getSupportFragmentManager(), mTabs));
|
viewPager.setAdapter(new TabActivity.OsmandFragmentPagerAdapter(getSupportFragmentManager(), mTabs));
|
||||||
mSlidingTabLayout.setViewPager(viewPager);
|
mSlidingTabLayout.setViewPager(viewPager);
|
||||||
|
|
|
@ -84,8 +84,9 @@ public class DownloadOsmandIndexesHelper {
|
||||||
if (target.endsWith("-tts/_ttsconfig.p") && target.startsWith("voice/")) {
|
if (target.endsWith("-tts/_ttsconfig.p") && target.startsWith("voice/")) {
|
||||||
String voice = target.substring("voice/".length(), target.length() - "/_ttsconfig.p".length());
|
String voice = target.substring("voice/".length(), target.length() - "/_ttsconfig.p".length());
|
||||||
File destFile = new File(voicePath, voice + File.separatorChar + "_ttsconfig.p");
|
File destFile = new File(voicePath, voice + File.separatorChar + "_ttsconfig.p");
|
||||||
result.add(new AssetIndexItem(voice +ext, "voice", date, dateModified,
|
|
||||||
"0.1", 1024*100, key, destFile.getPath(), DownloadActivityType.VOICE_FILE));
|
result.add(new AssetIndexItem(voice + ext, "voice", date, dateModified, "0.1", destFile.length(), key,
|
||||||
|
destFile.getPath(), DownloadActivityType.VOICE_FILE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result.sort();
|
result.sort();
|
||||||
|
|
|
@ -103,7 +103,6 @@ public class UpdatesIndexFragment extends ListFragment {
|
||||||
private void createListView() {
|
private void createListView() {
|
||||||
updateHeader();
|
updateHeader();
|
||||||
if (indexItems.size() == 0) {
|
if (indexItems.size() == 0) {
|
||||||
indexItems.clear();
|
|
||||||
if (DownloadActivity.downloadListIndexThread.isDownloadedFromInternet()) {
|
if (DownloadActivity.downloadListIndexThread.isDownloadedFromInternet()) {
|
||||||
indexItems.add(new IndexItem(getString(R.string.everything_up_to_date), "", 0, "", 0, 0, null));
|
indexItems.add(new IndexItem(getString(R.string.everything_up_to_date), "", 0, "", 0, 0, null));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -3,12 +3,12 @@ package net.osmand.plus.helpers;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
|
|
||||||
|
import net.osmand.data.LatLon;
|
||||||
import net.osmand.data.PointDescription;
|
import net.osmand.data.PointDescription;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
|
@ -416,22 +416,22 @@ public class SearchHistoryHelper {
|
||||||
"SELECT " + HISTORY_COL_NAME + ", " + HISTORY_COL_LAT + "," + HISTORY_COL_LON +", " +
|
"SELECT " + HISTORY_COL_NAME + ", " + HISTORY_COL_LAT + "," + HISTORY_COL_LON +", " +
|
||||||
HISTORY_COL_TIME + ", " + HISTORY_COL_FREQ_INTERVALS + ", " + HISTORY_COL_FREQ_VALUES +
|
HISTORY_COL_TIME + ", " + HISTORY_COL_FREQ_INTERVALS + ", " + HISTORY_COL_FREQ_VALUES +
|
||||||
" FROM " + HISTORY_TABLE_NAME , null); //$NON-NLS-1$//$NON-NLS-2$
|
" FROM " + HISTORY_TABLE_NAME , null); //$NON-NLS-1$//$NON-NLS-2$
|
||||||
Map<String, HistoryEntry> st = new TreeMap<String, HistoryEntry>();
|
Map<PointDescription, HistoryEntry> st = new HashMap<PointDescription, HistoryEntry>();
|
||||||
if (query.moveToFirst()) {
|
if (query.moveToFirst()) {
|
||||||
boolean reinsert = false;
|
boolean reinsert = false;
|
||||||
do {
|
do {
|
||||||
String name = query.getString(0);
|
String name = query.getString(0);
|
||||||
|
PointDescription p = PointDescription.deserializeFromString(name, new LatLon(query.getDouble(1), query.getDouble(2)));
|
||||||
HistoryEntry e = new HistoryEntry(query.getDouble(1), query.getDouble(2),
|
HistoryEntry e = new HistoryEntry(query.getDouble(1), query.getDouble(2),
|
||||||
PointDescription.deserializeFromString(name));
|
p);
|
||||||
long time = query.getLong(3);
|
long time = query.getLong(3);
|
||||||
e.setLastAccessTime(time);
|
e.setLastAccessTime(time);
|
||||||
e.setFrequency(query.getString(4), query.getString(5));
|
e.setFrequency(query.getString(4), query.getString(5));
|
||||||
if(st.containsKey(name) || st.containsKey(e.getSerializedName())
|
if(st.containsKey(p)) {
|
||||||
|| !Algorithms.objectEquals(name, e.getSerializedName())) {
|
|
||||||
reinsert = true;
|
reinsert = true;
|
||||||
}
|
}
|
||||||
entries.add(e);
|
entries.add(e);
|
||||||
st.put(e.getSerializedName(), e);
|
st.put(p, e);
|
||||||
} while (query.moveToNext());
|
} while (query.moveToNext());
|
||||||
if(reinsert) {
|
if(reinsert) {
|
||||||
System.err.println("Reinsert all values");
|
System.err.println("Reinsert all values");
|
||||||
|
|
|
@ -238,7 +238,7 @@ public class WaypointDialogHelper {
|
||||||
private void selectPoi(final int[] running, final ArrayAdapter<Object> listAdapter, final int type,
|
private void selectPoi(final int[] running, final ArrayAdapter<Object> listAdapter, final int type,
|
||||||
final boolean enable, Activity ctx) {
|
final boolean enable, Activity ctx) {
|
||||||
if (ctx instanceof MapActivity &&
|
if (ctx instanceof MapActivity &&
|
||||||
!PoiLegacyFilter.CUSTOM_FILTER_ID.equals(app.getSettings().getPoiFilterForMap())) {
|
!PoiLegacyFilter.CUSTOM_FILTER_ID.equals(app.getSettings().SELECTED_POI_FILTER_FOR_MAP.get())) {
|
||||||
MapActivity map = (MapActivity) ctx;
|
MapActivity map = (MapActivity) ctx;
|
||||||
final PoiLegacyFilter[] selected = new PoiLegacyFilter[1];
|
final PoiLegacyFilter[] selected = new PoiLegacyFilter[1];
|
||||||
AlertDialog dlg = map.getMapLayers().selectPOIFilterLayer(map.getMapView(), selected);
|
AlertDialog dlg = map.getMapLayers().selectPOIFilterLayer(map.getMapView(), selected);
|
||||||
|
|
|
@ -592,7 +592,7 @@ public class WaypointHelper {
|
||||||
|
|
||||||
///
|
///
|
||||||
public PoiLegacyFilter getPoiFilter() {
|
public PoiLegacyFilter getPoiFilter() {
|
||||||
return app.getPoiFilters().getFilterById(app.getSettings().getPoiFilterForMap());
|
return app.getPoiFilters().getFilterById(app.getSettings().SELECTED_POI_FILTER_FOR_MAP.get());
|
||||||
}
|
}
|
||||||
public boolean showPOI() {
|
public boolean showPOI() {
|
||||||
return app.getSettings().SHOW_NEARBY_POI.get();
|
return app.getSettings().SHOW_NEARBY_POI.get();
|
||||||
|
@ -700,7 +700,7 @@ public class WaypointHelper {
|
||||||
return uiCtx.getResources().getDrawable(R.drawable.list_warnings_traffic_calming);
|
return uiCtx.getResources().getDrawable(R.drawable.list_warnings_traffic_calming);
|
||||||
}
|
}
|
||||||
} else if(((AlarmInfo) point).getType().toString() == "TOLL_BOOTH") {
|
} else if(((AlarmInfo) point).getType().toString() == "TOLL_BOOTH") {
|
||||||
return uiCtx.getResources().getDrawable(R.drawable.mx_barrier_toll_booth);
|
return uiCtx.getResources().getDrawable(R.drawable.mx_toll_booth);
|
||||||
} else if(((AlarmInfo) point).getType().toString() == "STOP") {
|
} else if(((AlarmInfo) point).getType().toString() == "STOP") {
|
||||||
return uiCtx.getResources().getDrawable(R.drawable.list_stop);
|
return uiCtx.getResources().getDrawable(R.drawable.list_stop);
|
||||||
} else if(((AlarmInfo) point).getType().toString() == "PEDESTRIAN") {
|
} else if(((AlarmInfo) point).getType().toString() == "PEDESTRIAN") {
|
||||||
|
|
|
@ -15,7 +15,6 @@ import net.osmand.plus.OsmandSettings;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.FavoritesTreeFragment;
|
import net.osmand.plus.activities.FavoritesTreeFragment;
|
||||||
import net.osmand.plus.activities.TabActivity;
|
import net.osmand.plus.activities.TabActivity;
|
||||||
import net.osmand.plus.myplaces.AvailableGPXFragment;
|
|
||||||
import net.osmand.plus.osmedit.OsmEditingPlugin;
|
import net.osmand.plus.osmedit.OsmEditingPlugin;
|
||||||
import net.osmand.plus.views.controls.PagerSlidingTabStrip;
|
import net.osmand.plus.views.controls.PagerSlidingTabStrip;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
@ -24,12 +23,10 @@ import android.os.Bundle;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.support.v4.view.ViewPager;
|
import android.support.v4.view.ViewPager;
|
||||||
import android.support.v7.widget.SearchView;
|
import android.support.v7.widget.SearchView;
|
||||||
import android.support.v7.widget.Toolbar;
|
|
||||||
import android.text.Spannable;
|
import android.text.Spannable;
|
||||||
import android.text.SpannableStringBuilder;
|
import android.text.SpannableStringBuilder;
|
||||||
import android.text.style.ImageSpan;
|
import android.text.style.ImageSpan;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -39,12 +36,9 @@ public class FavoritesActivity extends TabActivity {
|
||||||
|
|
||||||
// private static final String FAVOURITES_INFO = "FAVOURITES_INFO";
|
// private static final String FAVOURITES_INFO = "FAVOURITES_INFO";
|
||||||
private static final String TRACKS = "TRACKS";
|
private static final String TRACKS = "TRACKS";
|
||||||
|
public static final int GPX_TAB = R.string.shared_string_my_tracks;
|
||||||
|
public static final int FAV_TAB = R.string.shared_string_my_favorites;
|
||||||
// private static final String SELECTED_TRACK = "SELECTED_TRACK";
|
// private static final String SELECTED_TRACK = "SELECTED_TRACK";
|
||||||
public static int FAVORITES_TAB = 0;
|
|
||||||
public static int GPX_TAB = 1;
|
|
||||||
public static int SELECTED_GPX_TAB = 2;
|
|
||||||
public static int NOTES_TAB = 3;
|
|
||||||
public static int OSM_EDITS_TAB = 4;
|
|
||||||
public static String TAB_PARAM = "TAB_PARAM";
|
public static String TAB_PARAM = "TAB_PARAM";
|
||||||
protected List<WeakReference<Fragment>> fragList = new ArrayList<WeakReference<Fragment>>();
|
protected List<WeakReference<Fragment>> fragList = new ArrayList<WeakReference<Fragment>>();
|
||||||
|
|
||||||
|
@ -79,25 +73,15 @@ public class FavoritesActivity extends TabActivity {
|
||||||
mTabs.add(getTabIndicator(R.string.shared_string_my_tracks, AvailableGPXFragment.class));
|
mTabs.add(getTabIndicator(R.string.shared_string_my_tracks, AvailableGPXFragment.class));
|
||||||
}
|
}
|
||||||
OsmandPlugin.addMyPlacesTabPlugins(this, mTabs, getIntent());
|
OsmandPlugin.addMyPlacesTabPlugins(this, mTabs, getIntent());
|
||||||
|
Integer tabId = settings.FAVORITES_TAB.get();
|
||||||
Integer tab = settings.FAVORITES_TAB.get();
|
int tab = 0;
|
||||||
if (tab == NOTES_TAB) {
|
for(int i = 0; i < mTabs.size(); i++) {
|
||||||
if (OsmandPlugin.getEnabledPlugin(OsmEditingPlugin.class) != null){
|
if(mTabs.get(i).resId == tabId) {
|
||||||
tab = mTabs.size() - 2;
|
tab = i;
|
||||||
} else {
|
|
||||||
tab = mTabs.size() - 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (tab == OSM_EDITS_TAB) {
|
|
||||||
tab = mTabs.size() - 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setViewPagerAdapter(mViewPager, mTabs);
|
setViewPagerAdapter(mViewPager, mTabs);
|
||||||
mSlidingTabLayout.setViewPager(mViewPager);
|
mSlidingTabLayout.setViewPager(mViewPager);
|
||||||
|
|
||||||
if (tab > mTabs.size() - 1){
|
|
||||||
tab = 0;
|
|
||||||
}
|
|
||||||
mViewPager.setCurrentItem(tab);
|
mViewPager.setCurrentItem(tab);
|
||||||
// setupHomeButton();
|
// setupHomeButton();
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ public class SelectedGPXFragment extends ListFragment {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
updateContent();
|
updateContent();
|
||||||
updateEnable = true;
|
updateEnable = true;
|
||||||
if(getGpx().showCurrentTrack && filterType() == GpxDisplayItemType.TRACK_POINTS) {
|
if(getGpx() != null && getGpx().showCurrentTrack && filterType() == GpxDisplayItemType.TRACK_POINTS) {
|
||||||
startHandler();
|
startHandler();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ public class SelectedGPXFragment extends ListFragment {
|
||||||
|
|
||||||
|
|
||||||
protected List<GpxDisplayGroup> filterGroups(GpxDisplayItemType type) {
|
protected List<GpxDisplayGroup> filterGroups(GpxDisplayItemType type) {
|
||||||
List<GpxDisplayGroup> result = ((TrackActivity)getActivity()).getResult();
|
List<GpxDisplayGroup> result = ((TrackActivity) getActivity()).getResult();
|
||||||
List<GpxDisplayGroup> groups = new ArrayList<GpxSelectionHelper.GpxDisplayGroup>();
|
List<GpxDisplayGroup> groups = new ArrayList<GpxSelectionHelper.GpxDisplayGroup>();
|
||||||
for (GpxDisplayGroup group : result) {
|
for (GpxDisplayGroup group : result) {
|
||||||
boolean add = group.getType() == type || type == null;
|
boolean add = group.getType() == type || type == null;
|
||||||
|
@ -238,7 +238,7 @@ public class SelectedGPXFragment extends ListFragment {
|
||||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
menu.clear();
|
menu.clear();
|
||||||
((TrackActivity) getActivity()).getClearToolbar(false);
|
((TrackActivity) getActivity()).getClearToolbar(false);
|
||||||
if (getGpx().path != null && !getGpx().showCurrentTrack) {
|
if (getGpx() != null && getGpx().path != null && !getGpx().showCurrentTrack) {
|
||||||
MenuItem item = menu.add(R.string.shared_string_share).setIcon(R.drawable.ic_action_gshare_dark)
|
MenuItem item = menu.add(R.string.shared_string_share).setIcon(R.drawable.ic_action_gshare_dark)
|
||||||
.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,5 +1,16 @@
|
||||||
package net.osmand.plus.osmedit;
|
package net.osmand.plus.osmedit;
|
||||||
|
|
||||||
|
import java.text.MessageFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.osmand.access.AccessibleToast;
|
||||||
|
import net.osmand.data.PointDescription;
|
||||||
|
import net.osmand.plus.OsmandPlugin;
|
||||||
|
import net.osmand.plus.ProgressImplementation;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.activities.MapActivity;
|
||||||
|
import net.osmand.plus.dashboard.DashBaseFragment;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
@ -12,18 +23,6 @@ import android.widget.ImageButton;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
import net.osmand.access.AccessibleToast;
|
|
||||||
import net.osmand.data.PointDescription;
|
|
||||||
import net.osmand.plus.OsmandPlugin;
|
|
||||||
import net.osmand.plus.ProgressImplementation;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.activities.MapActivity;
|
|
||||||
import net.osmand.plus.dashboard.DashBaseFragment;
|
|
||||||
import net.osmand.plus.myplaces.FavoritesActivity;
|
|
||||||
|
|
||||||
import java.text.MessageFormat;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Denis
|
* Created by Denis
|
||||||
|
@ -46,7 +45,7 @@ public class DashOsmEditsFragment extends DashBaseFragment implements OsmEditsUp
|
||||||
(view.findViewById(R.id.show_all)).setOnClickListener(new View.OnClickListener() {
|
(view.findViewById(R.id.show_all)).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
startFavoritesActivity(FavoritesActivity.OSM_EDITS_TAB);
|
startFavoritesActivity(R.string.osm_edits);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -135,17 +134,14 @@ public class DashOsmEditsFragment extends DashBaseFragment implements OsmEditsUp
|
||||||
getString(R.string.uploading), getString(R.string.local_openstreetmap_uploading),
|
getString(R.string.uploading), getString(R.string.local_openstreetmap_uploading),
|
||||||
ProgressDialog.STYLE_HORIZONTAL).getDialog();
|
ProgressDialog.STYLE_HORIZONTAL).getDialog();
|
||||||
UploadOpenstreetmapPointAsyncTask uploadTask = new UploadOpenstreetmapPointAsyncTask(dialog,
|
UploadOpenstreetmapPointAsyncTask uploadTask = new UploadOpenstreetmapPointAsyncTask(dialog,
|
||||||
DashOsmEditsFragment.this, remotepoi, remotebug, toUpload.length);
|
DashOsmEditsFragment.this, plugin, remotepoi, remotebug, toUpload.length);
|
||||||
uploadTask.execute(toUpload);
|
uploadTask.execute(toUpload);
|
||||||
dialog.show();
|
dialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void getOsmPoints(ArrayList<OsmPoint> dataPoints) {
|
private void getOsmPoints(ArrayList<OsmPoint> dataPoints) {
|
||||||
OpenstreetmapsDbHelper dbpoi = new OpenstreetmapsDbHelper(getActivity());
|
List<OpenstreetmapPoint> l1 = plugin.getDBPOI().getOpenstreetmapPoints();
|
||||||
OsmBugsDbHelper dbbug = new OsmBugsDbHelper(getActivity());
|
List<OsmNotesPoint> l2 = plugin.getDBBug().getOsmbugsPoints();
|
||||||
|
|
||||||
List<OpenstreetmapPoint> l1 = dbpoi.getOpenstreetmapPoints();
|
|
||||||
List<OsmNotesPoint> l2 = dbbug.getOsmbugsPoints();
|
|
||||||
if (l1.isEmpty()){
|
if (l1.isEmpty()){
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for(OsmPoint point : l2){
|
for(OsmPoint point : l2){
|
||||||
|
|
|
@ -108,14 +108,14 @@ public class EditingPOIDialogProvider implements DialogProvider {
|
||||||
|
|
||||||
private void prepareProvider() {
|
private void prepareProvider() {
|
||||||
poiTypes = ((OsmandApplication) activity.getApplication()).getPoiTypes();
|
poiTypes = ((OsmandApplication) activity.getApplication()).getPoiTypes();
|
||||||
allTranslatedSubTypes = poiTypes.getAllTranslatedNames();
|
allTranslatedSubTypes = poiTypes.getAllTranslatedNames(false);
|
||||||
settings = ((OsmandApplication) activity.getApplication()).getSettings();
|
settings = ((OsmandApplication) activity.getApplication()).getSettings();
|
||||||
isLocalEdit = true;
|
isLocalEdit = true;
|
||||||
if (settings.OFFLINE_EDITION.get() || !settings.isInternetConnectionAvailable(true)) {
|
if (settings.OFFLINE_EDITION.get() || !settings.isInternetConnectionAvailable(true)) {
|
||||||
this.openstreetmapUtil = new OpenstreetmapLocalUtil(activity);
|
this.openstreetmapUtil = new OpenstreetmapLocalUtil(plugin, activity);
|
||||||
this.openstreetmapUtilToLoad = openstreetmapUtil;
|
this.openstreetmapUtilToLoad = openstreetmapUtil;
|
||||||
} else if(!settings.isInternetConnectionAvailable(true)) {
|
} else if(!settings.isInternetConnectionAvailable(true)) {
|
||||||
this.openstreetmapUtil = new OpenstreetmapLocalUtil(activity);
|
this.openstreetmapUtil = new OpenstreetmapLocalUtil(plugin, activity);
|
||||||
this.openstreetmapUtilToLoad = new OpenstreetmapRemoteUtil(activity);
|
this.openstreetmapUtilToLoad = new OpenstreetmapRemoteUtil(activity);
|
||||||
} else {
|
} else {
|
||||||
isLocalEdit = false;
|
isLocalEdit = false;
|
||||||
|
@ -610,7 +610,7 @@ public class EditingPOIDialogProvider implements DialogProvider {
|
||||||
|
|
||||||
private Map<String, PoiType> getSubCategoriesMap(PoiCategory poiCategory) {
|
private Map<String, PoiType> getSubCategoriesMap(PoiCategory poiCategory) {
|
||||||
Map<String, PoiType> subCategories = new LinkedHashMap<>(poiTypes.getAllTranslatedNames(poiCategory, false));
|
Map<String, PoiType> subCategories = new LinkedHashMap<>(poiTypes.getAllTranslatedNames(poiCategory, false));
|
||||||
for (Map.Entry<String, PoiType> s : poiTypes.getAllTranslatedNames().entrySet()) {
|
for (Map.Entry<String, PoiType> s : allTranslatedSubTypes.entrySet()) {
|
||||||
if (!subCategories.containsKey(s.getKey())) {
|
if (!subCategories.containsKey(s.getKey())) {
|
||||||
subCategories.put(s.getKey(), s.getValue());
|
subCategories.put(s.getKey(), s.getValue());
|
||||||
}
|
}
|
||||||
|
@ -692,7 +692,6 @@ public class EditingPOIDialogProvider implements DialogProvider {
|
||||||
@Override
|
@Override
|
||||||
protected void onPostExecute(Node result) {
|
protected void onPostExecute(Node result) {
|
||||||
progress.dismiss();
|
progress.dismiss();
|
||||||
plugin.collectLocalOsmEdits();
|
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
successAction.run();
|
successAction.run();
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,13 +15,14 @@ import android.content.Context;
|
||||||
public class OpenstreetmapLocalUtil implements OpenstreetmapUtil {
|
public class OpenstreetmapLocalUtil implements OpenstreetmapUtil {
|
||||||
|
|
||||||
private final Context ctx;
|
private final Context ctx;
|
||||||
private final OpenstreetmapsDbHelper db;
|
|
||||||
|
|
||||||
public final static Log log = PlatformUtil.getLog(OpenstreetmapLocalUtil.class);
|
public final static Log log = PlatformUtil.getLog(OpenstreetmapLocalUtil.class);
|
||||||
|
|
||||||
public OpenstreetmapLocalUtil(Context uiContext) {
|
private OsmEditingPlugin plugin;
|
||||||
|
|
||||||
|
public OpenstreetmapLocalUtil(OsmEditingPlugin plugin, Context uiContext) {
|
||||||
|
this.plugin = plugin;
|
||||||
this.ctx = uiContext;
|
this.ctx = uiContext;
|
||||||
this.db = new OpenstreetmapsDbHelper(ctx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -33,16 +34,16 @@ public class OpenstreetmapLocalUtil implements OpenstreetmapUtil {
|
||||||
public Node commitNodeImpl(OsmPoint.Action action, Node n, EntityInfo info, String comment, boolean closeChangeSet){
|
public Node commitNodeImpl(OsmPoint.Action action, Node n, EntityInfo info, String comment, boolean closeChangeSet){
|
||||||
Node newNode = n;
|
Node newNode = n;
|
||||||
if (n.getId() == -1) {
|
if (n.getId() == -1) {
|
||||||
newNode = new Node(n, Math.min(-2, db.getMinID() - 1)); // generate local id for the created node
|
newNode = new Node(n, Math.min(-2, plugin.getDBPOI().getMinID() - 1)); // generate local id for the created node
|
||||||
}
|
}
|
||||||
OpenstreetmapPoint p = new OpenstreetmapPoint();
|
OpenstreetmapPoint p = new OpenstreetmapPoint();
|
||||||
p.setEntity(newNode);
|
p.setEntity(newNode);
|
||||||
p.setAction(action);
|
p.setAction(action);
|
||||||
p.setComment(comment);
|
p.setComment(comment);
|
||||||
if (p.getAction() == OsmPoint.Action.DELETE && newNode.getId() < 0) { //if it is our local poi
|
if (p.getAction() == OsmPoint.Action.DELETE && newNode.getId() < 0) { //if it is our local poi
|
||||||
db.deletePOI(p);
|
plugin.getDBPOI().deletePOI(p);
|
||||||
} else {
|
} else {
|
||||||
db.addOpenstreetmap(p);
|
plugin.getDBPOI().addOpenstreetmap(p);
|
||||||
}
|
}
|
||||||
return newNode;
|
return newNode;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,6 @@ import java.io.OutputStreamWriter;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -40,7 +39,6 @@ import org.xmlpull.v1.XmlSerializer;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Xml;
|
import android.util.Xml;
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
public class OpenstreetmapRemoteUtil implements OpenstreetmapUtil {
|
public class OpenstreetmapRemoteUtil implements OpenstreetmapUtil {
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class OpenstreetmapsDbHelper extends SQLiteOpenHelper {
|
||||||
OPENSTREETMAP_COL_LAT + " double," + OPENSTREETMAP_COL_LON + " double," +
|
OPENSTREETMAP_COL_LAT + " double," + OPENSTREETMAP_COL_LON + " double," +
|
||||||
OPENSTREETMAP_COL_TAGS + " VARCHAR(2048)," +
|
OPENSTREETMAP_COL_TAGS + " VARCHAR(2048)," +
|
||||||
OPENSTREETMAP_COL_ACTION + " TEXT, " + OPENSTREETMAP_COL_COMMENT + " TEXT);"; //$NON-NLS-1$ //$NON-NLS-2$
|
OPENSTREETMAP_COL_ACTION + " TEXT, " + OPENSTREETMAP_COL_COMMENT + " TEXT);"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
List<OpenstreetmapPoint> cache = null;
|
||||||
|
|
||||||
public OpenstreetmapsDbHelper(Context context) {
|
public OpenstreetmapsDbHelper(Context context) {
|
||||||
super(context, OPENSTREETMAP_DB_NAME, null, DATABASE_VERSION);
|
super(context, OPENSTREETMAP_DB_NAME, null, DATABASE_VERSION);
|
||||||
|
@ -47,11 +47,13 @@ public class OpenstreetmapsDbHelper extends SQLiteOpenHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<OpenstreetmapPoint> getOpenstreetmapPoints() {
|
public List<OpenstreetmapPoint> getOpenstreetmapPoints() {
|
||||||
|
if(cache == null ) {
|
||||||
return checkOpenstreetmapPoints();
|
return checkOpenstreetmapPoints();
|
||||||
}
|
}
|
||||||
|
return cache;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean addOpenstreetmap(OpenstreetmapPoint p) {
|
public boolean addOpenstreetmap(OpenstreetmapPoint p) {
|
||||||
checkOpenstreetmapPoints();
|
|
||||||
SQLiteDatabase db = getWritableDatabase();
|
SQLiteDatabase db = getWritableDatabase();
|
||||||
if (db != null) {
|
if (db != null) {
|
||||||
StringBuilder tags = new StringBuilder();
|
StringBuilder tags = new StringBuilder();
|
||||||
|
@ -67,6 +69,8 @@ public class OpenstreetmapsDbHelper extends SQLiteOpenHelper {
|
||||||
" (" + OPENSTREETMAP_COL_ID + ", " + OPENSTREETMAP_COL_LAT + ", " + OPENSTREETMAP_COL_LON + ", " + OPENSTREETMAP_COL_TAGS + ", " + OPENSTREETMAP_COL_ACTION + "," + OPENSTREETMAP_COL_COMMENT + ")" +
|
" (" + OPENSTREETMAP_COL_ID + ", " + OPENSTREETMAP_COL_LAT + ", " + OPENSTREETMAP_COL_LON + ", " + OPENSTREETMAP_COL_TAGS + ", " + OPENSTREETMAP_COL_ACTION + "," + OPENSTREETMAP_COL_COMMENT + ")" +
|
||||||
" VALUES (?, ?, ?, ?, ?, ?)",
|
" VALUES (?, ?, ?, ?, ?, ?)",
|
||||||
new Object[] { p.getId(),p.getLatitude(), p.getLongitude(), tags.toString() , OsmPoint.stringAction.get(p.getAction()), p.getComment(), }); //$NON-NLS-1$ //$NON-NLS-2$
|
new Object[] { p.getId(),p.getLatitude(), p.getLongitude(), tags.toString() , OsmPoint.stringAction.get(p.getAction()), p.getComment(), }); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
db.close();
|
||||||
|
checkOpenstreetmapPoints();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -75,11 +79,12 @@ public class OpenstreetmapsDbHelper extends SQLiteOpenHelper {
|
||||||
|
|
||||||
|
|
||||||
public boolean deletePOI(OpenstreetmapPoint p) {
|
public boolean deletePOI(OpenstreetmapPoint p) {
|
||||||
checkOpenstreetmapPoints();
|
|
||||||
SQLiteDatabase db = getWritableDatabase();
|
SQLiteDatabase db = getWritableDatabase();
|
||||||
if (db != null) {
|
if (db != null) {
|
||||||
db.execSQL("DELETE FROM " + OPENSTREETMAP_TABLE_NAME +
|
db.execSQL("DELETE FROM " + OPENSTREETMAP_TABLE_NAME +
|
||||||
" WHERE " + OPENSTREETMAP_COL_ID + " = ?", new Object[] { p.getId() }); //$NON-NLS-1$ //$NON-NLS-2$
|
" WHERE " + OPENSTREETMAP_COL_ID + " = ?", new Object[] { p.getId() }); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
db.close();
|
||||||
|
checkOpenstreetmapPoints();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -87,8 +92,8 @@ public class OpenstreetmapsDbHelper extends SQLiteOpenHelper {
|
||||||
|
|
||||||
|
|
||||||
private List<OpenstreetmapPoint> checkOpenstreetmapPoints(){
|
private List<OpenstreetmapPoint> checkOpenstreetmapPoints(){
|
||||||
SQLiteDatabase db = getWritableDatabase();
|
SQLiteDatabase db = getReadableDatabase();
|
||||||
List<OpenstreetmapPoint> cachedOpenstreetmapPoints = new ArrayList<OpenstreetmapPoint>();
|
List<OpenstreetmapPoint> points = new ArrayList<OpenstreetmapPoint>();
|
||||||
if (db != null) {
|
if (db != null) {
|
||||||
Cursor query = db.rawQuery("SELECT " + OPENSTREETMAP_COL_ID + ", " + OPENSTREETMAP_COL_LAT + "," + OPENSTREETMAP_COL_LON + "," + OPENSTREETMAP_COL_ACTION + "," + OPENSTREETMAP_COL_COMMENT + "," + OPENSTREETMAP_COL_TAGS+ " FROM " + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
Cursor query = db.rawQuery("SELECT " + OPENSTREETMAP_COL_ID + ", " + OPENSTREETMAP_COL_LAT + "," + OPENSTREETMAP_COL_LON + "," + OPENSTREETMAP_COL_ACTION + "," + OPENSTREETMAP_COL_COMMENT + "," + OPENSTREETMAP_COL_TAGS+ " FROM " + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||||
OPENSTREETMAP_TABLE_NAME, null);
|
OPENSTREETMAP_TABLE_NAME, null);
|
||||||
|
@ -106,12 +111,13 @@ public class OpenstreetmapsDbHelper extends SQLiteOpenHelper {
|
||||||
p.setEntity(entity);
|
p.setEntity(entity);
|
||||||
p.setAction(query.getString(3));
|
p.setAction(query.getString(3));
|
||||||
p.setComment(query.getString(4));
|
p.setComment(query.getString(4));
|
||||||
cachedOpenstreetmapPoints.add(p);
|
points.add(p);
|
||||||
} while (query.moveToNext());
|
} while (query.moveToNext());
|
||||||
}
|
}
|
||||||
query.close();
|
query.close();
|
||||||
}
|
}
|
||||||
return cachedOpenstreetmapPoints;
|
cache = points;
|
||||||
|
return points;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getMinID() {
|
public long getMinID() {
|
||||||
|
|
|
@ -23,7 +23,7 @@ public class OsmBugsDbHelper extends SQLiteOpenHelper {
|
||||||
OSMBUGS_COL_ID + " INTEGER, " + OSMBUGS_COL_TEXT + " TEXT, " + //$NON-NLS-1$ //$NON-NLS-2$
|
OSMBUGS_COL_ID + " INTEGER, " + OSMBUGS_COL_TEXT + " TEXT, " + //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
OSMBUGS_COL_LAT + " double, " + OSMBUGS_COL_LON + " double, " + //$NON-NLS-1$ //$NON-NLS-2$
|
OSMBUGS_COL_LAT + " double, " + OSMBUGS_COL_LON + " double, " + //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
OSMBUGS_COL_ACTION + " TEXT, " + OSMBUGS_COL_AUTHOR + " TEXT);"; //$NON-NLS-1$ //$NON-NLS-2$
|
OSMBUGS_COL_ACTION + " TEXT, " + OSMBUGS_COL_AUTHOR + " TEXT);"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
List<OsmNotesPoint> cache = null;
|
||||||
public OsmBugsDbHelper(Context context) {
|
public OsmBugsDbHelper(Context context) {
|
||||||
super(context, OSMBUGS_DB_NAME, null, DATABASE_VERSION);
|
super(context, OSMBUGS_DB_NAME, null, DATABASE_VERSION);
|
||||||
}
|
}
|
||||||
|
@ -38,11 +38,13 @@ public class OsmBugsDbHelper extends SQLiteOpenHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<OsmNotesPoint> getOsmbugsPoints() {
|
public List<OsmNotesPoint> getOsmbugsPoints() {
|
||||||
|
if (cache == null) {
|
||||||
return checkOsmbugsPoints();
|
return checkOsmbugsPoints();
|
||||||
}
|
}
|
||||||
|
return cache;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean addOsmbugs(OsmNotesPoint p) {
|
public boolean addOsmbugs(OsmNotesPoint p) {
|
||||||
checkOsmbugsPoints();
|
|
||||||
SQLiteDatabase db = getWritableDatabase();
|
SQLiteDatabase db = getWritableDatabase();
|
||||||
if (db != null) {
|
if (db != null) {
|
||||||
db.execSQL(
|
db.execSQL(
|
||||||
|
@ -50,24 +52,27 @@ public class OsmBugsDbHelper extends SQLiteOpenHelper {
|
||||||
+ OSMBUGS_COL_LON + "," + OSMBUGS_COL_ACTION + "," + OSMBUGS_COL_AUTHOR + ")" + " VALUES (?, ?, ?, ?, ?, ?)",
|
+ OSMBUGS_COL_LON + "," + OSMBUGS_COL_ACTION + "," + OSMBUGS_COL_AUTHOR + ")" + " VALUES (?, ?, ?, ?, ?, ?)",
|
||||||
new Object[] { p.getId(), p.getText(), p.getLatitude(), p.getLongitude(),
|
new Object[] { p.getId(), p.getText(), p.getLatitude(), p.getLongitude(),
|
||||||
OsmPoint.stringAction.get(p.getAction()), p.getAuthor() }); //$NON-NLS-1$ //$NON-NLS-2$
|
OsmPoint.stringAction.get(p.getAction()), p.getAuthor() }); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
db.close();
|
||||||
|
checkOsmbugsPoints();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean deleteAllBugModifications(OsmNotesPoint p) {
|
public boolean deleteAllBugModifications(OsmNotesPoint p) {
|
||||||
checkOsmbugsPoints();
|
|
||||||
SQLiteDatabase db = getWritableDatabase();
|
SQLiteDatabase db = getWritableDatabase();
|
||||||
if (db != null) {
|
if (db != null) {
|
||||||
db.execSQL("DELETE FROM " + OSMBUGS_TABLE_NAME +
|
db.execSQL("DELETE FROM " + OSMBUGS_TABLE_NAME +
|
||||||
" WHERE " + OSMBUGS_COL_ID + " = ?", new Object[] { p.getId() }); //$NON-NLS-1$ //$NON-NLS-2$
|
" WHERE " + OSMBUGS_COL_ID + " = ?", new Object[] { p.getId() }); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
db.close();
|
||||||
|
checkOsmbugsPoints();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<OsmNotesPoint> checkOsmbugsPoints(){
|
private List<OsmNotesPoint> checkOsmbugsPoints(){
|
||||||
SQLiteDatabase db = getWritableDatabase();
|
SQLiteDatabase db = getReadableDatabase();
|
||||||
List<OsmNotesPoint> cachedOsmbugsPoints = new ArrayList<OsmNotesPoint>();
|
List<OsmNotesPoint> cachedOsmbugsPoints = new ArrayList<OsmNotesPoint>();
|
||||||
if (db != null) {
|
if (db != null) {
|
||||||
Cursor query = db.rawQuery("SELECT " + OSMBUGS_COL_ID + ", " + OSMBUGS_COL_TEXT + ", " + OSMBUGS_COL_LAT + "," + OSMBUGS_COL_LON + "," + OSMBUGS_COL_ACTION + "," + OSMBUGS_COL_AUTHOR + " FROM " + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
Cursor query = db.rawQuery("SELECT " + OSMBUGS_COL_ID + ", " + OSMBUGS_COL_TEXT + ", " + OSMBUGS_COL_LAT + "," + OSMBUGS_COL_LON + "," + OSMBUGS_COL_ACTION + "," + OSMBUGS_COL_AUTHOR + " FROM " + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||||
|
@ -88,6 +93,7 @@ public class OsmBugsDbHelper extends SQLiteOpenHelper {
|
||||||
}
|
}
|
||||||
query.close();
|
query.close();
|
||||||
}
|
}
|
||||||
|
cache = cachedOsmbugsPoints;
|
||||||
return cachedOsmbugsPoints;
|
return cachedOsmbugsPoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,14 @@
|
||||||
package net.osmand.plus.osmedit;
|
package net.osmand.plus.osmedit;
|
||||||
|
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
import java.io.BufferedReader;
|
||||||
import android.app.AlertDialog.Builder;
|
import java.io.IOException;
|
||||||
import android.app.Dialog;
|
import java.io.InputStreamReader;
|
||||||
import android.content.DialogInterface;
|
import java.io.Serializable;
|
||||||
import android.graphics.Canvas;
|
import java.net.URLConnection;
|
||||||
import android.graphics.Paint;
|
import java.util.ArrayList;
|
||||||
import android.graphics.PointF;
|
import java.util.List;
|
||||||
import android.os.AsyncTask;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.util.Xml;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.ArrayAdapter;
|
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.Toast;
|
|
||||||
import net.osmand.AndroidUtils;
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.PlatformUtil;
|
import net.osmand.PlatformUtil;
|
||||||
import net.osmand.access.AccessibleToast;
|
import net.osmand.access.AccessibleToast;
|
||||||
|
@ -39,13 +33,20 @@ import org.apache.commons.logging.Log;
|
||||||
import org.xmlpull.v1.XmlPullParser;
|
import org.xmlpull.v1.XmlPullParser;
|
||||||
import org.xmlpull.v1.XmlPullParserException;
|
import org.xmlpull.v1.XmlPullParserException;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import android.app.AlertDialog;
|
||||||
import java.io.IOException;
|
import android.app.AlertDialog.Builder;
|
||||||
import java.io.InputStreamReader;
|
import android.app.Dialog;
|
||||||
import java.io.Serializable;
|
import android.content.DialogInterface;
|
||||||
import java.net.URLConnection;
|
import android.graphics.Canvas;
|
||||||
import java.util.ArrayList;
|
import android.graphics.Paint;
|
||||||
import java.util.List;
|
import android.graphics.PointF;
|
||||||
|
import android.os.AsyncTask;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.util.Xml;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider, DialogProvider {
|
public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider, DialogProvider {
|
||||||
|
|
||||||
|
@ -220,9 +221,6 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
|
||||||
if(data != null) {
|
if(data != null) {
|
||||||
data.clearCache();
|
data.clearCache();
|
||||||
}
|
}
|
||||||
if (plugin != null){
|
|
||||||
plugin.collectLocalOsmEdits();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String readText(XmlPullParser parser, String key) throws XmlPullParserException, IOException {
|
private static String readText(XmlPullParser parser, String key) throws XmlPullParserException, IOException {
|
||||||
|
|
|
@ -1,23 +1,9 @@
|
||||||
package net.osmand.plus.osmedit;
|
package net.osmand.plus.osmedit;
|
||||||
|
|
||||||
import android.app.Activity;
|
import java.util.List;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.content.DialogInterface.OnClickListener;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.support.v4.app.Fragment;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.ArrayAdapter;
|
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.Spinner;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import net.osmand.access.AccessibleToast;
|
import net.osmand.access.AccessibleToast;
|
||||||
import net.osmand.data.Amenity;
|
import net.osmand.data.Amenity;
|
||||||
import net.osmand.data.DataTileManager;
|
|
||||||
import net.osmand.plus.ContextMenuAdapter;
|
import net.osmand.plus.ContextMenuAdapter;
|
||||||
import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick;
|
import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
@ -33,21 +19,48 @@ import net.osmand.plus.myplaces.AvailableGPXFragment.GpxInfo;
|
||||||
import net.osmand.plus.myplaces.FavoritesActivity;
|
import net.osmand.plus.myplaces.FavoritesActivity;
|
||||||
import net.osmand.plus.views.OsmandMapTileView;
|
import net.osmand.plus.views.OsmandMapTileView;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
|
import android.app.Activity;
|
||||||
import java.util.List;
|
import android.app.AlertDialog;
|
||||||
|
import android.app.AlertDialog.Builder;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.content.DialogInterface.OnClickListener;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.Spinner;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
|
||||||
public class OsmEditingPlugin extends OsmandPlugin {
|
public class OsmEditingPlugin extends OsmandPlugin {
|
||||||
private static final String ID = "osm.editing";
|
private static final String ID = "osm.editing";
|
||||||
private OsmandSettings settings;
|
private OsmandSettings settings;
|
||||||
private OsmandApplication app;
|
private OsmandApplication app;
|
||||||
DataTileManager<OsmPoint> localOsmEditsInternal = null;
|
OpenstreetmapsDbHelper dbpoi ;
|
||||||
|
OsmBugsDbHelper dbbug ;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return ID;
|
return ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public OpenstreetmapsDbHelper getDBPOI() {
|
||||||
|
if(dbpoi == null) {
|
||||||
|
dbpoi = new OpenstreetmapsDbHelper(app);
|
||||||
|
}
|
||||||
|
return dbpoi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OsmBugsDbHelper getDBBug() {
|
||||||
|
if(dbbug == null) {
|
||||||
|
dbbug = new OsmBugsDbHelper(app);
|
||||||
|
}
|
||||||
|
return dbbug;
|
||||||
|
}
|
||||||
|
|
||||||
public OsmEditingPlugin(OsmandApplication app) {
|
public OsmEditingPlugin(OsmandApplication app) {
|
||||||
this.app = app;
|
this.app = app;
|
||||||
}
|
}
|
||||||
|
@ -150,12 +163,10 @@ public class OsmEditingPlugin extends OsmandPlugin {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addMyPlacesTab(FavoritesActivity favoritesActivity, List<TabActivity.TabItem> mTabs, Intent intent) {
|
public void addMyPlacesTab(FavoritesActivity favoritesActivity, List<TabActivity.TabItem> mTabs, Intent intent) {
|
||||||
OpenstreetmapsDbHelper dbpoi = new OpenstreetmapsDbHelper(favoritesActivity);
|
if (getDBPOI().getOpenstreetmapPoints().size() > 0 || getDBBug().getOsmbugsPoints().size() > 0){
|
||||||
OsmBugsDbHelper dbbug = new OsmBugsDbHelper(favoritesActivity);
|
|
||||||
if (dbpoi.getOpenstreetmapPoints().size() > 0 || dbbug.getOsmbugsPoints().size() > 0){
|
|
||||||
mTabs.add(favoritesActivity.getTabIndicator(R.string.osm_edits, OsmEditsFragment.class));
|
mTabs.add(favoritesActivity.getTabIndicator(R.string.osm_edits, OsmEditsFragment.class));
|
||||||
if (intent != null && "OSM".equals(intent.getStringExtra("TAB"))) {
|
if (intent != null && "OSM".equals(intent.getStringExtra("TAB"))) {
|
||||||
app.getSettings().FAVORITES_TAB.set(FavoritesActivity.OSM_EDITS_TAB);
|
app.getSettings().FAVORITES_TAB.set(R.string.osm_edits);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -223,11 +234,7 @@ public class OsmEditingPlugin extends OsmandPlugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onLocalItemDeleted(OsmPoint point) {
|
|
||||||
if(localOsmEditsInternal != null) {
|
|
||||||
localOsmEditsInternal.unregisterObject(point.getLatitude(), point.getLongitude(), point);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum UploadVisibility implements IEnumWithResource {
|
public enum UploadVisibility implements IEnumWithResource {
|
||||||
Public(R.string.gpxup_public),
|
Public(R.string.gpxup_public),
|
||||||
|
@ -285,39 +292,6 @@ public class OsmEditingPlugin extends OsmandPlugin {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onLocalOsmEditAdded(OsmPoint point){
|
|
||||||
if(localOsmEditsInternal != null) {
|
|
||||||
localOsmEditsInternal.registerObject(point.getLatitude(), point.getLongitude(), point);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void collectLocalOsmEdits() {
|
|
||||||
DataTileManager<OsmPoint> res = new DataTileManager<OsmPoint>();
|
|
||||||
OpenstreetmapsDbHelper dbpoi = new OpenstreetmapsDbHelper(app);
|
|
||||||
OsmBugsDbHelper dbbug = new OsmBugsDbHelper(app);
|
|
||||||
|
|
||||||
List<OpenstreetmapPoint> l1 = dbpoi.getOpenstreetmapPoints();
|
|
||||||
List<OsmNotesPoint> l2 = dbbug.getOsmbugsPoints();
|
|
||||||
for (OsmPoint point : l1) {
|
|
||||||
res.registerObject(point.getLatitude(), point.getLongitude(), point);
|
|
||||||
}
|
|
||||||
for (OsmPoint point : l2) {
|
|
||||||
res.registerObject(point.getLatitude(), point.getLongitude(), point);
|
|
||||||
}
|
|
||||||
localOsmEditsInternal = res;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataTileManager<OsmPoint> getLocalOsmEdits(){
|
|
||||||
if(localOsmEditsInternal == null) {
|
|
||||||
collectLocalOsmEdits();
|
|
||||||
}
|
|
||||||
return localOsmEditsInternal;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<OsmPoint> getAllEdits(){
|
|
||||||
return getLocalOsmEdits().getAllObjects();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
|
|
|
@ -61,9 +61,6 @@ public class OsmEditsFragment extends ListFragment implements OsmEditsUploadList
|
||||||
|
|
||||||
private boolean selectionMode = false;
|
private boolean selectionMode = false;
|
||||||
|
|
||||||
private OpenstreetmapsDbHelper dbpoi;
|
|
||||||
private OsmBugsDbHelper dbbug;
|
|
||||||
|
|
||||||
private OpenstreetmapRemoteUtil remotepoi;
|
private OpenstreetmapRemoteUtil remotepoi;
|
||||||
private OsmBugsRemoteUtil remotebug;
|
private OsmBugsRemoteUtil remotebug;
|
||||||
|
|
||||||
|
@ -82,8 +79,6 @@ public class OsmEditsFragment extends ListFragment implements OsmEditsUploadList
|
||||||
plugin = OsmandPlugin.getEnabledPlugin(OsmEditingPlugin.class);
|
plugin = OsmandPlugin.getEnabledPlugin(OsmEditingPlugin.class);
|
||||||
View view = getActivity().getLayoutInflater().inflate(R.layout.update_index, container, false);
|
View view = getActivity().getLayoutInflater().inflate(R.layout.update_index, container, false);
|
||||||
((TextView) view.findViewById(R.id.header)).setText(R.string.your_edits);
|
((TextView) view.findViewById(R.id.header)).setText(R.string.your_edits);
|
||||||
dbpoi = new OpenstreetmapsDbHelper(getActivity());
|
|
||||||
dbbug = new OsmBugsDbHelper(getActivity());
|
|
||||||
|
|
||||||
remotepoi = new OpenstreetmapRemoteUtil(getActivity());
|
remotepoi = new OpenstreetmapRemoteUtil(getActivity());
|
||||||
remotebug = new OsmBugsRemoteUtil(getMyApplication());
|
remotebug = new OsmBugsRemoteUtil(getMyApplication());
|
||||||
|
@ -307,13 +302,12 @@ public class OsmEditsFragment extends ListFragment implements OsmEditsUploadList
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
OsmPoint omsPoint = it.next();
|
OsmPoint omsPoint = it.next();
|
||||||
if (omsPoint.getGroup() == OsmPoint.Group.POI) {
|
if (omsPoint.getGroup() == OsmPoint.Group.POI) {
|
||||||
dbpoi.deletePOI((OpenstreetmapPoint) omsPoint);
|
plugin.getDBPOI().deletePOI((OpenstreetmapPoint) omsPoint);
|
||||||
} else if (omsPoint.getGroup() == OsmPoint.Group.BUG) {
|
} else if (omsPoint.getGroup() == OsmPoint.Group.BUG) {
|
||||||
dbbug.deleteAllBugModifications((OsmNotesPoint) omsPoint);
|
plugin.getDBBug().deleteAllBugModifications((OsmNotesPoint) omsPoint);
|
||||||
}
|
}
|
||||||
it.remove();
|
it.remove();
|
||||||
listAdapter.delete(omsPoint);
|
listAdapter.delete(omsPoint);
|
||||||
plugin.onLocalItemDeleted(omsPoint);
|
|
||||||
}
|
}
|
||||||
listAdapter.notifyDataSetChanged();
|
listAdapter.notifyDataSetChanged();
|
||||||
|
|
||||||
|
@ -327,8 +321,8 @@ public class OsmEditsFragment extends ListFragment implements OsmEditsUploadList
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
dataPoints = new ArrayList<>();
|
dataPoints = new ArrayList<>();
|
||||||
List<OpenstreetmapPoint> l1 = dbpoi.getOpenstreetmapPoints();
|
List<OpenstreetmapPoint> l1 = plugin.getDBPOI().getOpenstreetmapPoints();
|
||||||
List<OsmNotesPoint> l2 = dbbug.getOsmbugsPoints();
|
List<OsmNotesPoint> l2 = plugin.getDBBug().getOsmbugsPoints();
|
||||||
dataPoints.addAll(l1);
|
dataPoints.addAll(l1);
|
||||||
dataPoints.addAll(l2);
|
dataPoints.addAll(l2);
|
||||||
listAdapter = new OsmEditsAdapter(dataPoints);
|
listAdapter = new OsmEditsAdapter(dataPoints);
|
||||||
|
@ -507,7 +501,7 @@ public class OsmEditsFragment extends ListFragment implements OsmEditsUploadList
|
||||||
getString(R.string.uploading),
|
getString(R.string.uploading),
|
||||||
getString(R.string.local_openstreetmap_uploading),
|
getString(R.string.local_openstreetmap_uploading),
|
||||||
ProgressDialog.STYLE_HORIZONTAL).getDialog();
|
ProgressDialog.STYLE_HORIZONTAL).getDialog();
|
||||||
UploadOpenstreetmapPointAsyncTask uploadTask = new UploadOpenstreetmapPointAsyncTask(dialog, this, remotepoi,
|
UploadOpenstreetmapPointAsyncTask uploadTask = new UploadOpenstreetmapPointAsyncTask(dialog, this, plugin, remotepoi,
|
||||||
remotebug, toUpload.length);
|
remotebug, toUpload.length);
|
||||||
uploadTask.execute(toUpload);
|
uploadTask.execute(toUpload);
|
||||||
|
|
||||||
|
@ -621,7 +615,6 @@ public class OsmEditsFragment extends ListFragment implements OsmEditsUploadList
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uploadUpdated(OsmPoint point) {
|
public void uploadUpdated(OsmPoint point) {
|
||||||
plugin.onLocalItemDeleted(point);
|
|
||||||
listAdapter.delete(point);
|
listAdapter.delete(point);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,24 +1,23 @@
|
||||||
package net.osmand.plus.osmedit;
|
package net.osmand.plus.osmedit;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.osmand.data.LatLon;
|
||||||
|
import net.osmand.data.PointDescription;
|
||||||
|
import net.osmand.data.RotatedTileBox;
|
||||||
|
import net.osmand.plus.ContextMenuAdapter;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.activities.MapActivity;
|
||||||
|
import net.osmand.plus.views.ContextMenuLayer;
|
||||||
|
import net.osmand.plus.views.OsmandMapLayer;
|
||||||
|
import net.osmand.plus.views.OsmandMapTileView;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.Paint;
|
import android.graphics.Paint;
|
||||||
import android.graphics.PointF;
|
import android.graphics.PointF;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
import net.osmand.data.DataTileManager;
|
|
||||||
import net.osmand.data.LatLon;
|
|
||||||
import net.osmand.data.PointDescription;
|
|
||||||
import net.osmand.data.QuadRect;
|
|
||||||
import net.osmand.data.RotatedTileBox;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.activities.MapActivity;
|
|
||||||
import net.osmand.plus.views.ContextMenuLayer;
|
|
||||||
import net.osmand.plus.views.OsmandMapLayer;
|
|
||||||
import net.osmand.plus.views.OsmandMapTileView;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Denis on
|
* Created by Denis on
|
||||||
|
@ -71,10 +70,12 @@ public class OsmEditsLayer extends OsmandMapLayer implements ContextMenuLayer.IC
|
||||||
@Override
|
@Override
|
||||||
public void onPrepareBufferImage(Canvas canvas, RotatedTileBox tileBox, DrawSettings settings) {
|
public void onPrepareBufferImage(Canvas canvas, RotatedTileBox tileBox, DrawSettings settings) {
|
||||||
if (tileBox.getZoom() >= startZoom) {
|
if (tileBox.getZoom() >= startZoom) {
|
||||||
DataTileManager<OsmPoint> points = plugin.getLocalOsmEdits();
|
drawPoints(canvas, tileBox, plugin.getDBBug().getOsmbugsPoints());
|
||||||
final QuadRect latlon = tileBox.getLatLonBounds();
|
drawPoints(canvas, tileBox, plugin.getDBPOI().getOpenstreetmapPoints());
|
||||||
List<OsmPoint> objects = points.getObjects(latlon. top, latlon.left, latlon.bottom, latlon.right);
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void drawPoints(Canvas canvas, RotatedTileBox tileBox, List<? extends OsmPoint> objects) {
|
||||||
for (OsmPoint o : objects) {
|
for (OsmPoint o : objects) {
|
||||||
int locationX = tileBox.getPixXFromLonNoRot(o.getLongitude());
|
int locationX = tileBox.getPixXFromLonNoRot(o.getLongitude());
|
||||||
int locationY = tileBox.getPixYFromLatNoRot(o.getLatitude());
|
int locationY = tileBox.getPixYFromLatNoRot(o.getLatitude());
|
||||||
|
@ -91,7 +92,6 @@ public class OsmEditsLayer extends OsmandMapLayer implements ContextMenuLayer.IC
|
||||||
canvas.rotate(view.getRotate(), locationX, locationY);
|
canvas.rotate(view.getRotate(), locationX, locationY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void destroyLayer() {
|
public void destroyLayer() {
|
||||||
|
@ -109,7 +109,13 @@ public class OsmEditsLayer extends OsmandMapLayer implements ContextMenuLayer.IC
|
||||||
int ey = (int) point.y;
|
int ey = (int) point.y;
|
||||||
int compare = getRadiusPoi(tileBox);
|
int compare = getRadiusPoi(tileBox);
|
||||||
int radius = compare * 3 / 2;
|
int radius = compare * 3 / 2;
|
||||||
for (OsmPoint n : plugin.getAllEdits()) {
|
compare = getFromPoint(tileBox, am, ex, ey, compare, radius, plugin.getDBBug().getOsmbugsPoints());
|
||||||
|
compare = getFromPoint(tileBox, am, ex, ey, compare, radius, plugin.getDBPOI().getOpenstreetmapPoints());
|
||||||
|
}
|
||||||
|
|
||||||
|
private int getFromPoint(RotatedTileBox tileBox, List<? super OsmPoint> am, int ex, int ey, int compare,
|
||||||
|
int radius, List<? extends OsmPoint> pnts) {
|
||||||
|
for (OsmPoint n : pnts) {
|
||||||
int x = (int) tileBox.getPixXFromLatLon(n.getLatitude(), n.getLongitude());
|
int x = (int) tileBox.getPixXFromLatLon(n.getLatitude(), n.getLongitude());
|
||||||
int y = (int) tileBox.getPixYFromLatLon(n.getLatitude(), n.getLongitude());
|
int y = (int) tileBox.getPixYFromLatLon(n.getLatitude(), n.getLongitude());
|
||||||
if (calculateBelongs(ex, ey, x, y, compare)) {
|
if (calculateBelongs(ex, ey, x, y, compare)) {
|
||||||
|
@ -117,6 +123,7 @@ public class OsmEditsLayer extends OsmandMapLayer implements ContextMenuLayer.IC
|
||||||
am.add(n);
|
am.add(n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return compare;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean calculateBelongs(int ex, int ey, int objx, int objy, int radius) {
|
private boolean calculateBelongs(int ex, int ey, int objx, int objy, int radius) {
|
||||||
|
@ -146,6 +153,28 @@ public class OsmEditsLayer extends OsmandMapLayer implements ContextMenuLayer.IC
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void populateObjectContextMenu(Object o, ContextMenuAdapter adapter) {
|
||||||
|
if (o instanceof OsmPoint) {
|
||||||
|
final OsmPoint r = (OsmPoint) o;
|
||||||
|
adapter.item(R.string.osm_edit_context_menu_delete).iconColor(R.drawable.ic_action_delete_dark
|
||||||
|
).listen(new ContextMenuAdapter.OnContextMenuClick() {
|
||||||
|
@Override
|
||||||
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
if(r instanceof OsmNotesPoint) {
|
||||||
|
plugin.getDBBug().deleteAllBugModifications((OsmNotesPoint) r);
|
||||||
|
} else if(r instanceof OpenstreetmapPoint) {
|
||||||
|
plugin.getDBPOI().deletePOI((OpenstreetmapPoint) r);
|
||||||
|
}
|
||||||
|
view.refreshMap();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}).reg();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getObjectDescription(Object o) {
|
public String getObjectDescription(Object o) {
|
||||||
if(o instanceof OsmPoint) {
|
if(o instanceof OsmPoint) {
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class SettingsOsmEditingActivity extends SettingsBaseActivity {
|
||||||
final Intent favorites = new Intent(SettingsOsmEditingActivity.this,
|
final Intent favorites = new Intent(SettingsOsmEditingActivity.this,
|
||||||
appCustomization.getFavoritesActivity());
|
appCustomization.getFavoritesActivity());
|
||||||
favorites.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
favorites.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
||||||
getMyApplication().getSettings().FAVORITES_TAB.set(FavoritesActivity.OSM_EDITS_TAB);
|
getMyApplication().getSettings().FAVORITES_TAB.set(R.string.osm_edits);
|
||||||
startActivity(favorites);
|
startActivity(favorites);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,6 @@ public class UploadOpenstreetmapPointAsyncTask extends AsyncTask<OsmPoint, OsmPo
|
||||||
|
|
||||||
private OsmBugsRemoteUtil remotebug;
|
private OsmBugsRemoteUtil remotebug;
|
||||||
|
|
||||||
private OpenstreetmapsDbHelper dbpoi;
|
|
||||||
private OsmBugsDbHelper dbbug;
|
|
||||||
|
|
||||||
private int listSize = 0;
|
private int listSize = 0;
|
||||||
|
|
||||||
|
@ -29,15 +27,18 @@ public class UploadOpenstreetmapPointAsyncTask extends AsyncTask<OsmPoint, OsmPo
|
||||||
|
|
||||||
private Fragment ctx;
|
private Fragment ctx;
|
||||||
|
|
||||||
public UploadOpenstreetmapPointAsyncTask(ProgressDialog progress,Fragment ctx, OpenstreetmapRemoteUtil remotepoi, OsmBugsRemoteUtil remotebug,
|
private OsmEditingPlugin plugin;
|
||||||
|
|
||||||
|
public UploadOpenstreetmapPointAsyncTask(ProgressDialog progress,Fragment ctx,
|
||||||
|
OsmEditingPlugin plugin,
|
||||||
|
OpenstreetmapRemoteUtil remotepoi, OsmBugsRemoteUtil remotebug,
|
||||||
int listSize) {
|
int listSize) {
|
||||||
this.progress = progress;
|
this.progress = progress;
|
||||||
|
this.plugin = plugin;
|
||||||
this.remotepoi = remotepoi;
|
this.remotepoi = remotepoi;
|
||||||
this.remotebug = remotebug;
|
this.remotebug = remotebug;
|
||||||
this.listSize = listSize;
|
this.listSize = listSize;
|
||||||
this.ctx = ctx;
|
this.ctx = ctx;
|
||||||
dbpoi = new OpenstreetmapsDbHelper(ctx.getActivity());
|
|
||||||
dbbug = new OsmBugsDbHelper(ctx.getActivity());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -56,7 +57,8 @@ public class UploadOpenstreetmapPointAsyncTask extends AsyncTask<OsmPoint, OsmPo
|
||||||
}
|
}
|
||||||
Node n = remotepoi.commitNodeImpl(p.getAction(), p.getEntity(), entityInfo, p.getComment(), false);
|
Node n = remotepoi.commitNodeImpl(p.getAction(), p.getEntity(), entityInfo, p.getComment(), false);
|
||||||
if (n != null) {
|
if (n != null) {
|
||||||
dbpoi.deletePOI(p);
|
|
||||||
|
plugin.getDBPOI().deletePOI(p);
|
||||||
publishProgress(p);
|
publishProgress(p);
|
||||||
uploaded++;
|
uploaded++;
|
||||||
}
|
}
|
||||||
|
@ -71,7 +73,7 @@ public class UploadOpenstreetmapPointAsyncTask extends AsyncTask<OsmPoint, OsmPo
|
||||||
success = remotebug.closingBug(p.getId(), p.getText(), p.getAuthor()) == null;
|
success = remotebug.closingBug(p.getId(), p.getText(), p.getAuthor()) == null;
|
||||||
}
|
}
|
||||||
if (success) {
|
if (success) {
|
||||||
dbbug.deleteAllBugModifications(p);
|
plugin.getDBBug().deleteAllBugModifications(p);
|
||||||
uploaded++;
|
uploaded++;
|
||||||
publishProgress(p);
|
publishProgress(p);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package net.osmand.plus.osmo;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.osmand.Location;
|
import net.osmand.Location;
|
||||||
|
@ -201,13 +202,16 @@ public class DashOsMoFragment extends DashLocationFragment implements OsMoGroups
|
||||||
}
|
}
|
||||||
|
|
||||||
//remove all inactive devices
|
//remove all inactive devices
|
||||||
for (OsMoGroupsStorage.OsMoDevice device : devices) {
|
Iterator<OsMoDevice> it = devices.iterator();
|
||||||
if (!device.isActive() && !device.isEnabled() && devices.size() > 2) {
|
while (it.hasNext()) {
|
||||||
devices.remove(device);
|
|
||||||
}
|
|
||||||
if (devices.size() < 4) {
|
if (devices.size() < 4) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
OsMoGroupsStorage.OsMoDevice device = it.next();
|
||||||
|
if (!device.isActive() && !device.isEnabled() && devices.size() > 2) {
|
||||||
|
it.remove();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sortDevices(devices);
|
sortDevices(devices);
|
||||||
|
|
|
@ -126,8 +126,10 @@ public class PoiFiltersHelper {
|
||||||
AbstractPoiType tp = application.getPoiTypes().getAnyPoiTypeByKey(typeId);
|
AbstractPoiType tp = application.getPoiTypes().getAnyPoiTypeByKey(typeId);
|
||||||
if(tp != null) {
|
if(tp != null) {
|
||||||
PoiLegacyFilter lf = new PoiLegacyFilter(tp, application);
|
PoiLegacyFilter lf = new PoiLegacyFilter(tp, application);
|
||||||
cacheTopStandardFilters.add(lf);
|
ArrayList<PoiLegacyFilter> copy = new ArrayList<PoiLegacyFilter>(cacheTopStandardFilters);
|
||||||
sortListOfFilters(cacheTopStandardFilters);
|
copy.add(lf);
|
||||||
|
sortListOfFilters(copy);
|
||||||
|
cacheTopStandardFilters = copy;
|
||||||
return lf;
|
return lf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -136,9 +138,9 @@ public class PoiFiltersHelper {
|
||||||
|
|
||||||
|
|
||||||
public void reloadAllPoiFilters() {
|
public void reloadAllPoiFilters() {
|
||||||
cacheTopStandardFilters = null;
|
|
||||||
showAllPOIFilter = null;
|
showAllPOIFilter = null;
|
||||||
getShowAllPOIFilter();
|
getShowAllPOIFilter();
|
||||||
|
cacheTopStandardFilters = null;
|
||||||
getTopDefinedPoiFilters();
|
getTopDefinedPoiFilters();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,15 +170,16 @@ public class PoiFiltersHelper {
|
||||||
|
|
||||||
public List<PoiLegacyFilter> getTopDefinedPoiFilters() {
|
public List<PoiLegacyFilter> getTopDefinedPoiFilters() {
|
||||||
if (cacheTopStandardFilters == null) {
|
if (cacheTopStandardFilters == null) {
|
||||||
cacheTopStandardFilters = new ArrayList<PoiLegacyFilter>();
|
List<PoiLegacyFilter> top = new ArrayList<PoiLegacyFilter>();
|
||||||
// user defined
|
// user defined
|
||||||
cacheTopStandardFilters.addAll(getUserDefinedPoiFilters());
|
top.addAll(getUserDefinedPoiFilters());
|
||||||
// default
|
// default
|
||||||
MapPoiTypes poiTypes = application.getPoiTypes();
|
MapPoiTypes poiTypes = application.getPoiTypes();
|
||||||
for (PoiFilter t : poiTypes.getTopVisibleFilters()) {
|
for (PoiFilter t : poiTypes.getTopVisibleFilters()) {
|
||||||
cacheTopStandardFilters.add(new PoiLegacyFilter(t, application));
|
top.add(new PoiLegacyFilter(t, application));
|
||||||
}
|
}
|
||||||
sortListOfFilters(cacheTopStandardFilters);
|
sortListOfFilters(top);
|
||||||
|
cacheTopStandardFilters = top;
|
||||||
}
|
}
|
||||||
List<PoiLegacyFilter> result = new ArrayList<PoiLegacyFilter>();
|
List<PoiLegacyFilter> result = new ArrayList<PoiLegacyFilter>();
|
||||||
if(OsmandPlugin.getEnabledPlugin(AccessibilityPlugin.class) != null) {
|
if(OsmandPlugin.getEnabledPlugin(AccessibilityPlugin.class) != null) {
|
||||||
|
@ -205,7 +208,9 @@ public class PoiFiltersHelper {
|
||||||
}
|
}
|
||||||
boolean res = helper.deleteFilter(helper.getWritableDatabase(), filter);
|
boolean res = helper.deleteFilter(helper.getWritableDatabase(), filter);
|
||||||
if(res){
|
if(res){
|
||||||
cacheTopStandardFilters.remove(filter);
|
ArrayList<PoiLegacyFilter> copy = new ArrayList<>(cacheTopStandardFilters);
|
||||||
|
copy.remove(filter);
|
||||||
|
cacheTopStandardFilters = copy;
|
||||||
}
|
}
|
||||||
helper.close();
|
helper.close();
|
||||||
return res;
|
return res;
|
||||||
|
@ -225,8 +230,10 @@ public class PoiFiltersHelper {
|
||||||
}
|
}
|
||||||
res = helper.addFilter(filter, helper.getWritableDatabase(), false);
|
res = helper.addFilter(filter, helper.getWritableDatabase(), false);
|
||||||
if(res){
|
if(res){
|
||||||
cacheTopStandardFilters.add(filter);
|
ArrayList<PoiLegacyFilter> copy = new ArrayList<>(cacheTopStandardFilters);
|
||||||
sortListOfFilters(cacheTopStandardFilters);
|
copy.add(filter);
|
||||||
|
sortListOfFilters(copy);
|
||||||
|
cacheTopStandardFilters = copy;
|
||||||
}
|
}
|
||||||
helper.close();
|
helper.close();
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -41,7 +41,7 @@ import android.widget.Spinner;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
public class OsmandRasterMapsPlugin extends OsmandPlugin {
|
public class OsmandRasterMapsPlugin extends OsmandPlugin {
|
||||||
private static final String ID = "osmand.rastermaps";
|
public static final String ID = "osmand.rastermaps";
|
||||||
private OsmandSettings settings;
|
private OsmandSettings settings;
|
||||||
private OsmandApplication app;
|
private OsmandApplication app;
|
||||||
|
|
||||||
|
@ -214,11 +214,10 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
adapter.item(R.string.layer_map).iconColor(R.drawable.ic_world_globe_dark)
|
|
||||||
.listen(listener).position(3).reg();
|
adapter.item(R.string.layer_overlay).selected(overlayLayer != null && overlayLayer.getMap() != null ? 1 : 0).
|
||||||
adapter.item(R.string.layer_overlay).selected(overlayLayer.getMap() != null ? 1 : 0).
|
|
||||||
iconColor(R.drawable.ic_layer_top_dark).listen(listener).position(14).reg();
|
iconColor(R.drawable.ic_layer_top_dark).listen(listener).position(14).reg();
|
||||||
adapter.item(R.string.layer_underlay).selected(underlayLayer.getMap() != null ? 1 : 0)
|
adapter.item(R.string.layer_underlay).selected(underlayLayer != null && underlayLayer.getMap() != null ? 1 : 0)
|
||||||
.iconColor(R.drawable.ic_layer_bottom_dark).listen(listener).position(15).reg();
|
.iconColor(R.drawable.ic_layer_bottom_dark).listen(listener).position(15).reg();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,21 +38,8 @@ public class SettingsRasterMapsActivity extends SettingsBaseActivity {
|
||||||
cat.setTitle(R.string.pref_raster_map);
|
cat.setTitle(R.string.pref_raster_map);
|
||||||
grp.addPreference(cat);
|
grp.addPreference(cat);
|
||||||
|
|
||||||
CheckBoxPreference mapVectorData = createCheckBoxPreference(settings.MAP_ONLINE_DATA,
|
// present on configure map
|
||||||
R.string.map_online_data, R.string.map_online_data_descr);
|
// addTileSourcePrefs(listener, cat);
|
||||||
// final OnPreferenceChangeListener parent = mapVectorData.getOnPreferenceChangeListener();
|
|
||||||
// MapRenderRepositories r = app.getResourceManager().getRenderer();
|
|
||||||
// if(r.isEmpty()){
|
|
||||||
// AccessibleToast.makeText(this, getString(R.string.no_vector_map_loaded), Toast.LENGTH_LONG).show();
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
cat.addPreference(mapVectorData);
|
|
||||||
|
|
||||||
tileSourcePreference = new ListPreference(this);
|
|
||||||
tileSourcePreference.setSummary(R.string.map_tile_source_descr);
|
|
||||||
tileSourcePreference.setTitle(R.string.map_tile_source);
|
|
||||||
tileSourcePreference.setOnPreferenceChangeListener(listener);
|
|
||||||
cat.addPreference(tileSourcePreference);
|
|
||||||
|
|
||||||
cat.addPreference(createCheckBoxPreference(settings.USE_INTERNET_TO_DOWNLOAD_TILES,
|
cat.addPreference(createCheckBoxPreference(settings.USE_INTERNET_TO_DOWNLOAD_TILES,
|
||||||
R.string.use_internet, R.string.use_internet_to_download_tile));
|
R.string.use_internet, R.string.use_internet_to_download_tile));
|
||||||
|
@ -69,18 +56,15 @@ public class SettingsRasterMapsActivity extends SettingsBaseActivity {
|
||||||
entries, intValues, R.string.level_to_switch_vector_raster, R.string.level_to_switch_vector_raster_descr);
|
entries, intValues, R.string.level_to_switch_vector_raster, R.string.level_to_switch_vector_raster_descr);
|
||||||
cat.addPreference(lp);
|
cat.addPreference(lp);
|
||||||
|
|
||||||
// try without, Issue 823:
|
// present on configure map
|
||||||
// int startZoom = 12;
|
// addOverlayPrefs(grp, listener);
|
||||||
// int endZoom = 19;
|
|
||||||
// entries = new String[endZoom - startZoom + 1];
|
}
|
||||||
// Integer[] intValues = new Integer[endZoom - startZoom + 1];
|
|
||||||
// for (int i = startZoom; i <= endZoom; i++) {
|
|
||||||
// entries[i - startZoom] = i + ""; //$NON-NLS-1$
|
|
||||||
// intValues[i - startZoom] = i ;
|
|
||||||
// }
|
|
||||||
// registerListPreference(osmandosmandSettings.MAX_LEVEL_TO_DOWNLOAD_TILE, screen, entries, intValues);
|
|
||||||
|
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private void addOverlayPrefs(PreferenceScreen grp, OnPreferenceChangeListener listener) {
|
||||||
|
PreferenceCategory cat;
|
||||||
cat = new PreferenceCategory(this);
|
cat = new PreferenceCategory(this);
|
||||||
cat.setTitle(R.string.pref_overlay);
|
cat.setTitle(R.string.pref_overlay);
|
||||||
grp.addPreference(cat);
|
grp.addPreference(cat);
|
||||||
|
@ -102,7 +86,20 @@ public class SettingsRasterMapsActivity extends SettingsBaseActivity {
|
||||||
sp = createSeekBarPreference(settings.MAP_TRANSPARENCY, R.string.map_transparency, R.string.map_transparency_descr,
|
sp = createSeekBarPreference(settings.MAP_TRANSPARENCY, R.string.map_transparency, R.string.map_transparency_descr,
|
||||||
R.string.modify_transparency, 0, 255);
|
R.string.modify_transparency, 0, 255);
|
||||||
cat.addPreference(sp);
|
cat.addPreference(sp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private void addTileSourcePrefs(OnPreferenceChangeListener listener, PreferenceCategory cat) {
|
||||||
|
CheckBoxPreference mapVectorData = createCheckBoxPreference(settings.MAP_ONLINE_DATA,
|
||||||
|
R.string.map_online_data, R.string.map_online_data_descr);
|
||||||
|
cat.addPreference(mapVectorData);
|
||||||
|
|
||||||
|
tileSourcePreference = new ListPreference(this);
|
||||||
|
tileSourcePreference.setSummary(R.string.map_tile_source_descr);
|
||||||
|
tileSourcePreference.setTitle(R.string.map_tile_source);
|
||||||
|
tileSourcePreference.setOnPreferenceChangeListener(listener);
|
||||||
|
cat.addPreference(tileSourcePreference);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -258,20 +258,7 @@ public class MapRenderRepositories {
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
|
|
||||||
// check that everything is initialized
|
// check that everything is initialized
|
||||||
for (String mapName : files.keySet()) {
|
checkInitialized(zoom, library, leftX, rightX, bottomY, topY);
|
||||||
BinaryMapIndexReader fr = files.get(mapName);
|
|
||||||
if (fr != null && fr.containsMapData(leftX, topY, rightX, bottomY, zoom)) {
|
|
||||||
if (!nativeFiles.contains(mapName)) {
|
|
||||||
long time = System.currentTimeMillis();
|
|
||||||
nativeFiles.add(mapName);
|
|
||||||
if (!library.initMapFile(mapName)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
log.debug("Native resource " + mapName + " initialized " + (System.currentTimeMillis() - time) + " ms"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
NativeSearchResult resultHandler = library.searchObjectsForRendering(leftX, rightX, topY, bottomY, zoom, renderingReq,
|
NativeSearchResult resultHandler = library.searchObjectsForRendering(leftX, rightX, topY, bottomY, zoom, renderingReq,
|
||||||
checkForDuplicateObjectIds, this, "");
|
checkForDuplicateObjectIds, this, "");
|
||||||
if (checkWhetherInterrupted()) {
|
if (checkWhetherInterrupted()) {
|
||||||
|
@ -290,6 +277,27 @@ public class MapRenderRepositories {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void checkInitialized(final int zoom, NativeOsmandLibrary library, int leftX, int rightX, int bottomY,
|
||||||
|
int topY) {
|
||||||
|
if(library == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (String mapName : files.keySet()) {
|
||||||
|
BinaryMapIndexReader fr = files.get(mapName);
|
||||||
|
if (fr != null && (fr.containsMapData(leftX, topY, rightX, bottomY, zoom) ||
|
||||||
|
fr.containsRouteData(leftX, topY, rightX, bottomY, zoom))) {
|
||||||
|
if (!nativeFiles.contains(mapName)) {
|
||||||
|
long time = System.currentTimeMillis();
|
||||||
|
nativeFiles.add(mapName);
|
||||||
|
if (!library.initMapFile(mapName)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
log.debug("Native resource " + mapName + " initialized " + (System.currentTimeMillis() - time) + " ms"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void readRouteDataAsMapObjects(SearchRequest<BinaryMapDataObject> sr, BinaryMapIndexReader c,
|
private void readRouteDataAsMapObjects(SearchRequest<BinaryMapDataObject> sr, BinaryMapIndexReader c,
|
||||||
final ArrayList<BinaryMapDataObject> tempResult, final TLongSet ids) {
|
final ArrayList<BinaryMapDataObject> tempResult, final TLongSet ids) {
|
||||||
final boolean basemap = c.isBasemap();
|
final boolean basemap = c.isBasemap();
|
||||||
|
|
|
@ -656,6 +656,27 @@ public class RouteProvider {
|
||||||
}
|
}
|
||||||
// BUILD context
|
// BUILD context
|
||||||
NativeOsmandLibrary lib = settings.SAFE_MODE.get() ? null : NativeOsmandLibrary.getLoadedLibrary();
|
NativeOsmandLibrary lib = settings.SAFE_MODE.get() ? null : NativeOsmandLibrary.getLoadedLibrary();
|
||||||
|
// check loaded files
|
||||||
|
int leftX = MapUtils.get31TileNumberX(params.start.getLongitude());
|
||||||
|
int rightX = leftX;
|
||||||
|
int bottomY = MapUtils.get31TileNumberY(params.start.getLatitude());
|
||||||
|
int topY = bottomY;
|
||||||
|
if (params.intermediates != null) {
|
||||||
|
for (LatLon l : params.intermediates) {
|
||||||
|
leftX = Math.min(MapUtils.get31TileNumberX(l.getLongitude()), leftX);
|
||||||
|
rightX = Math.max(MapUtils.get31TileNumberX(l.getLongitude()), rightX);
|
||||||
|
bottomY = Math.max(MapUtils.get31TileNumberY(l.getLatitude()), bottomY);
|
||||||
|
topY = Math.min(MapUtils.get31TileNumberY(l.getLatitude()), topY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LatLon l = params.end;
|
||||||
|
leftX = Math.min(MapUtils.get31TileNumberX(l.getLongitude()), leftX);
|
||||||
|
rightX = Math.max(MapUtils.get31TileNumberX(l.getLongitude()), rightX);
|
||||||
|
bottomY = Math.max(MapUtils.get31TileNumberY(l.getLatitude()), bottomY);
|
||||||
|
topY = Math.min(MapUtils.get31TileNumberY(l.getLatitude()), topY);
|
||||||
|
|
||||||
|
params.ctx.getResourceManager().getRenderer().checkInitialized(15, lib, leftX, rightX, bottomY, topY);
|
||||||
|
|
||||||
RoutingContext ctx = router.buildRoutingContext(cf,
|
RoutingContext ctx = router.buildRoutingContext(cf,
|
||||||
lib, files,
|
lib, files,
|
||||||
RouteCalculationMode.NORMAL);
|
RouteCalculationMode.NORMAL);
|
||||||
|
@ -666,7 +687,11 @@ public class RouteProvider {
|
||||||
ctx.leftSideNavigation = params.leftSide;
|
ctx.leftSideNavigation = params.leftSide;
|
||||||
ctx.calculationProgress = params.calculationProgress;
|
ctx.calculationProgress = params.calculationProgress;
|
||||||
if(params.previousToRecalculate != null && params.onlyStartPointChanged) {
|
if(params.previousToRecalculate != null && params.onlyStartPointChanged) {
|
||||||
ctx.previouslyCalculatedRoute = params.previousToRecalculate.getOriginalRoute();
|
int currentRoute = params.previousToRecalculate.getCurrentRoute();
|
||||||
|
List<RouteSegmentResult> originalRoute = params.previousToRecalculate.getOriginalRoute();
|
||||||
|
if(originalRoute != null && currentRoute < originalRoute.size()) {
|
||||||
|
ctx.previouslyCalculatedRoute = originalRoute.subList(currentRoute, originalRoute.size());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(complex && router.getRecalculationEnd(ctx) != null) {
|
if(complex && router.getRecalculationEnd(ctx) != null) {
|
||||||
complex = false;
|
complex = false;
|
||||||
|
@ -676,9 +701,7 @@ public class RouteProvider {
|
||||||
RouteCalculationMode.COMPLEX);
|
RouteCalculationMode.COMPLEX);
|
||||||
complexCtx.calculationProgress = params.calculationProgress;
|
complexCtx.calculationProgress = params.calculationProgress;
|
||||||
complexCtx.leftSideNavigation = params.leftSide;
|
complexCtx.leftSideNavigation = params.leftSide;
|
||||||
if(params.previousToRecalculate != null && params.onlyStartPointChanged) {
|
complexCtx.previouslyCalculatedRoute = ctx.previouslyCalculatedRoute;
|
||||||
complexCtx.previouslyCalculatedRoute = params.previousToRecalculate.getOriginalRoute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LatLon st = new LatLon(params.start.getLatitude(), params.start.getLongitude());
|
LatLon st = new LatLon(params.start.getLatitude(), params.start.getLongitude());
|
||||||
|
|
|
@ -531,14 +531,14 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
|
||||||
R.string.menu_mute_on, R.string.menu_mute_off,
|
R.string.menu_mute_on, R.string.menu_mute_off,
|
||||||
R.string.where_am_i, R.string.context_menu_item_share_location);
|
R.string.where_am_i, R.string.context_menu_item_share_location);
|
||||||
//poi
|
//poi
|
||||||
if (osmandSettings.SHOW_POI_OVER_MAP.get()) {
|
if (osmandSettings.SELECTED_POI_FILTER_FOR_MAP.get()!= null) {
|
||||||
adapter.item(R.string.sherpafy_disable_poi).iconColor(
|
adapter.item(R.string.sherpafy_disable_poi).iconColor(
|
||||||
R.drawable.ic_action_gremove_dark)
|
R.drawable.ic_action_gremove_dark)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
app.getSettings().SHOW_POI_OVER_MAP.set(false);
|
app.getSettings().SELECTED_POI_FILTER_FOR_MAP.set(null);
|
||||||
mapActivity.getMapLayers().updateLayers(mapActivity.getMapView());
|
mapActivity.refreshMap();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}).reg();
|
}).reg();
|
||||||
|
@ -548,8 +548,6 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
mapActivity.getMapLayers().selectPOIFilterLayer(mapActivity.getMapView(), null);
|
mapActivity.getMapLayers().selectPOIFilterLayer(mapActivity.getMapView(), null);
|
||||||
app.getSettings().SHOW_POI_OVER_MAP.set(true);
|
|
||||||
mapActivity.getMapLayers().updateLayers(mapActivity.getMapView());
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}).reg();
|
}).reg();
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue