Merge branch 'master' into Color_select_favs_group_out_of_screen
This commit is contained in:
commit
d5612464cc
39 changed files with 192 additions and 99350 deletions
|
@ -43,6 +43,7 @@ task collectTestResources(type: Copy) {
|
|||
into "src/test/resources/"
|
||||
from("../../resources/test-resources") {
|
||||
include "*"
|
||||
include "/search/*"
|
||||
}
|
||||
from("../../resources/poi") {
|
||||
include "poi_types.xml"
|
||||
|
|
|
@ -957,6 +957,24 @@ public class GPXUtilities {
|
|||
return ls;
|
||||
}
|
||||
|
||||
public static QuadRect calculateBounds(List<WptPt> pts) {
|
||||
QuadRect trackBounds = new QuadRect(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY,
|
||||
Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY);
|
||||
updateBounds(trackBounds, pts, 0);
|
||||
|
||||
return trackBounds;
|
||||
}
|
||||
|
||||
public static void updateBounds(QuadRect trackBounds, List<WptPt> pts, int startIndex) {
|
||||
for (int i = startIndex; i < pts.size(); i++) {
|
||||
WptPt pt = pts.get(i);
|
||||
trackBounds.right = Math.max(trackBounds.right, pt.lon);
|
||||
trackBounds.left = Math.min(trackBounds.left, pt.lon);
|
||||
trackBounds.top = Math.max(trackBounds.top, pt.lat);
|
||||
trackBounds.bottom = Math.min(trackBounds.bottom, pt.lat);
|
||||
}
|
||||
}
|
||||
|
||||
public static class GPXFile extends GPXExtensions {
|
||||
public String author;
|
||||
public Metadata metadata;
|
||||
|
|
|
@ -221,7 +221,7 @@ public class BinaryMapAddressReaderAdapter {
|
|||
int fp = codedIS.getTotalBytesRead();
|
||||
int length = codedIS.readRawVarint32();
|
||||
int oldLimit = codedIS.pushLimit(length);
|
||||
City c = readCityHeader(new DefaultCityMatcher(matcher), fp, additionalTagsTable);
|
||||
City c = readCityHeader(resultMatcher, new DefaultCityMatcher(matcher), fp, additionalTagsTable);
|
||||
if (c != null) {
|
||||
if (resultMatcher == null || resultMatcher.publish(c)) {
|
||||
cities.add(c);
|
||||
|
@ -256,6 +256,7 @@ public class BinaryMapAddressReaderAdapter {
|
|||
int oldLimit = codedIS.pushLimit(length);
|
||||
readStreet(s, null, false, x >> 7, y >> 7, city.isPostcode() ? city.getName() : null,
|
||||
attributeTagsTable);
|
||||
publishRawData(resultMatcher, s);
|
||||
if (resultMatcher == null || resultMatcher.publish(s)) {
|
||||
city.registerStreet(s);
|
||||
}
|
||||
|
@ -303,7 +304,7 @@ public class BinaryMapAddressReaderAdapter {
|
|||
}
|
||||
}
|
||||
|
||||
protected City readCityHeader(CityMatcher matcher, int filePointer, List<String> additionalTagsTable) throws IOException {
|
||||
protected City readCityHeader(SearchRequest<? super City> resultMatcher, CityMatcher matcher, int filePointer, List<String> additionalTagsTable) throws IOException {
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
City c = null;
|
||||
|
@ -313,6 +314,7 @@ public class BinaryMapAddressReaderAdapter {
|
|||
int tag = WireFormat.getTagFieldNumber(t);
|
||||
switch (tag) {
|
||||
case 0:
|
||||
publishRawData(resultMatcher, c);
|
||||
return (matcher == null || matcher.matches(c)) ? c : null;
|
||||
case OsmandOdb.CityIndex.CITY_TYPE_FIELD_NUMBER:
|
||||
int type = codedIS.readUInt32();
|
||||
|
@ -445,6 +447,7 @@ public class BinaryMapAddressReaderAdapter {
|
|||
if (loadBuildingsAndIntersected) {
|
||||
int oldLimit = codedIS.pushLimit(length);
|
||||
Building b = readBuilding(offset, x, y, additionalTagsTable);
|
||||
publishRawData(buildingsMatcher, b);
|
||||
if (postcodeFilter == null || postcodeFilter.equalsIgnoreCase(b.getPostcode())) {
|
||||
if (buildingsMatcher == null || buildingsMatcher.publish(b)) {
|
||||
s.addBuilding(b);
|
||||
|
@ -688,7 +691,7 @@ public class BinaryMapAddressReaderAdapter {
|
|||
codedIS.seek(contOffset);
|
||||
int len = codedIS.readRawVarint32();
|
||||
int old = codedIS.pushLimit(len);
|
||||
obj = readCityHeader(null, contOffset, reg.attributeTagsTable);
|
||||
obj = readCityHeader(req, null, contOffset, reg.attributeTagsTable);
|
||||
codedIS.popLimit(old);
|
||||
}
|
||||
if (obj != null) {
|
||||
|
@ -701,6 +704,7 @@ public class BinaryMapAddressReaderAdapter {
|
|||
readStreet(s, null, false, MapUtils.get31TileNumberX(l.getLongitude()) >> 7,
|
||||
MapUtils.get31TileNumberY(l.getLatitude()) >> 7, obj.isPostcode() ? obj.getName() : null,
|
||||
reg.attributeTagsTable);
|
||||
publishRawData(req, s);
|
||||
boolean matches = stringMatcher.matches(s.getName());
|
||||
if (!matches) {
|
||||
for (String n : s.getAllNames()) {
|
||||
|
@ -727,7 +731,8 @@ public class BinaryMapAddressReaderAdapter {
|
|||
codedIS.seek(offset);
|
||||
int len = codedIS.readRawVarint32();
|
||||
int old = codedIS.pushLimit(len);
|
||||
City obj = readCityHeader(cityPostcodeMatcher, list.get(j), reg.attributeTagsTable);
|
||||
City obj = readCityHeader(req, cityPostcodeMatcher, list.get(j), reg.attributeTagsTable);
|
||||
publishRawData(req, obj);
|
||||
if (obj != null && !published.contains(offset)) {
|
||||
req.publish(obj);
|
||||
published.add(offset);
|
||||
|
@ -805,4 +810,9 @@ public class BinaryMapAddressReaderAdapter {
|
|||
}
|
||||
}
|
||||
|
||||
private <T> void publishRawData(SearchRequest<T> resultMatcher, T obj) {
|
||||
if (resultMatcher != null && obj != null) {
|
||||
resultMatcher.collectRawData(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -496,7 +496,7 @@ public class BinaryMapIndexReader {
|
|||
}
|
||||
}
|
||||
Iterator<Entry<TransportIndex, TIntArrayList>> it = groupPoints.entrySet().iterator();
|
||||
if (it.hasNext()) {
|
||||
while (it.hasNext()) {
|
||||
Entry<TransportIndex, TIntArrayList> e = it.next();
|
||||
TransportIndex ind = e.getKey();
|
||||
TIntArrayList pointers = e.getValue();
|
||||
|
@ -1457,8 +1457,14 @@ public class BinaryMapIndexReader {
|
|||
|
||||
public static <T> SearchRequest<T> buildAddressByNameRequest(ResultMatcher<T> resultMatcher, String nameRequest,
|
||||
StringMatcherMode matcherMode) {
|
||||
return buildAddressByNameRequest(resultMatcher, null, nameRequest, matcherMode);
|
||||
}
|
||||
|
||||
public static <T> SearchRequest<T> buildAddressByNameRequest(ResultMatcher<T> resultMatcher, ResultMatcher<T> rawDataCollector, String nameRequest,
|
||||
StringMatcherMode matcherMode) {
|
||||
SearchRequest<T> request = new SearchRequest<T>();
|
||||
request.resultMatcher = resultMatcher;
|
||||
request.rawDataCollector = rawDataCollector;
|
||||
request.nameQuery = nameRequest.trim();
|
||||
request.matcherMode = matcherMode;
|
||||
return request;
|
||||
|
@ -1542,6 +1548,10 @@ public class BinaryMapIndexReader {
|
|||
|
||||
|
||||
public static SearchRequest<Amenity> buildSearchPoiRequest(int x, int y, String nameFilter, int sleft, int sright, int stop, int sbottom, ResultMatcher<Amenity> resultMatcher) {
|
||||
return buildSearchPoiRequest(x, y, nameFilter, sleft, sright, stop, sbottom, resultMatcher, null);
|
||||
}
|
||||
|
||||
public static SearchRequest<Amenity> buildSearchPoiRequest(int x, int y, String nameFilter, int sleft, int sright, int stop, int sbottom, ResultMatcher<Amenity> resultMatcher, ResultMatcher<Amenity> rawDataCollector) {
|
||||
SearchRequest<Amenity> request = new SearchRequest<Amenity>();
|
||||
request.x = x;
|
||||
request.y = y;
|
||||
|
@ -1550,6 +1560,7 @@ public class BinaryMapIndexReader {
|
|||
request.top = stop;
|
||||
request.bottom = sbottom;
|
||||
request.resultMatcher = resultMatcher;
|
||||
request.rawDataCollector = rawDataCollector;
|
||||
request.nameQuery = nameFilter.trim();
|
||||
return request;
|
||||
}
|
||||
|
@ -1634,6 +1645,7 @@ public class BinaryMapIndexReader {
|
|||
private boolean ocean = false;
|
||||
|
||||
private ResultMatcher<T> resultMatcher;
|
||||
private ResultMatcher<T> rawDataCollector;
|
||||
|
||||
// 31 zoom tiles
|
||||
// common variables
|
||||
|
@ -1711,6 +1723,12 @@ public class BinaryMapIndexReader {
|
|||
return false;
|
||||
}
|
||||
|
||||
public void collectRawData(T obj) {
|
||||
if (rawDataCollector != null) {
|
||||
rawDataCollector.publish(obj);
|
||||
}
|
||||
}
|
||||
|
||||
protected void publishOceanTile(boolean ocean) {
|
||||
if (ocean) {
|
||||
this.ocean = true;
|
||||
|
|
|
@ -26,7 +26,6 @@ import net.osmand.data.Amenity.AmenityRoutePoint;
|
|||
import net.osmand.data.LatLon;
|
||||
import net.osmand.osm.MapPoiTypes;
|
||||
import net.osmand.osm.PoiCategory;
|
||||
import net.osmand.osm.PoiType;
|
||||
import net.osmand.util.MapUtils;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
@ -591,6 +590,7 @@ public class BinaryMapPoiReaderAdapter {
|
|||
}
|
||||
}
|
||||
if (matches) {
|
||||
req.collectRawData(am);
|
||||
req.publish(am);
|
||||
}
|
||||
}
|
||||
|
@ -637,6 +637,7 @@ public class BinaryMapPoiReaderAdapter {
|
|||
int yp = (int) MapUtils.getTileNumberY(zSkip, am.getLocation().getLatitude());
|
||||
long valSkip = (((long) xp) << zSkip) | yp;
|
||||
if (!toSkip.contains(valSkip)) {
|
||||
req.collectRawData(am);
|
||||
boolean publish = req.publish(am);
|
||||
if (publish) {
|
||||
read = true;
|
||||
|
@ -647,6 +648,7 @@ public class BinaryMapPoiReaderAdapter {
|
|||
return read;
|
||||
}
|
||||
} else {
|
||||
req.collectRawData(am);
|
||||
if (req.publish(am)) {
|
||||
read = true;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ import net.osmand.osm.edit.Way;
|
|||
import net.osmand.util.MapUtils;
|
||||
|
||||
public class TransportStopsRouteReader {
|
||||
public static final int MISSING_STOP_SEARCH_RADIUS = 30000;
|
||||
public static final int MISSING_STOP_SEARCH_RADIUS = 50000;
|
||||
TLongObjectHashMap<TransportRoute> combinedRoutesCache = new TLongObjectHashMap<TransportRoute>();
|
||||
Map<BinaryMapIndexReader, TIntObjectHashMap<TransportRoute>> routesFilesCache = new LinkedHashMap<BinaryMapIndexReader,
|
||||
TIntObjectHashMap<TransportRoute>>();
|
||||
|
@ -128,6 +128,7 @@ public class TransportStopsRouteReader {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return routesToLoad;
|
||||
}
|
||||
|
||||
|
|
|
@ -516,7 +516,7 @@ public class SearchUICore {
|
|||
}
|
||||
currentSearchResult = collection;
|
||||
if (phrase.getSettings().isExportObjects()) {
|
||||
//rm.createTestJSON(collection);
|
||||
rm.createTestJSON(collection);
|
||||
}
|
||||
rm.searchFinished(phrase);
|
||||
if (onResultsComplete != null) {
|
||||
|
|
|
@ -203,7 +203,9 @@ public class SearchCoreFactory {
|
|||
}
|
||||
}
|
||||
if (!leftUnknownSearchWords.isEmpty() && api != null && api.isSearchAvailable(phrase)) {
|
||||
SearchPhrase nphrase = phrase.selectWord(res, leftUnknownSearchWords, phrase.isLastUnknownSearchWordComplete());
|
||||
SearchPhrase nphrase = phrase.selectWord(res, leftUnknownSearchWords,
|
||||
phrase.isLastUnknownSearchWordComplete() ||
|
||||
!leftUnknownSearchWords.contains(phrase.getLastUnknownSearchWord()));
|
||||
SearchResult prev = resultMatcher.setParentSearchResult(publish ? res :
|
||||
resultMatcher.getParentSearchResult());
|
||||
api.search(nphrase, resultMatcher);
|
||||
|
@ -397,9 +399,6 @@ public class SearchCoreFactory {
|
|||
int limit = 0;
|
||||
@Override
|
||||
public boolean publish(MapObject object) {
|
||||
if (phrase.getSettings().isExportObjects()) {
|
||||
resultMatcher.exportObject(phrase, object);
|
||||
}
|
||||
if (isCancelled()) {
|
||||
return false;
|
||||
}
|
||||
|
@ -492,6 +491,23 @@ public class SearchCoreFactory {
|
|||
resultMatcher.isCancelled();
|
||||
}
|
||||
};
|
||||
|
||||
ResultMatcher<MapObject> rawDataCollector = null;
|
||||
if (phrase.getSettings().isExportObjects()) {
|
||||
rawDataCollector = new ResultMatcher<MapObject>() {
|
||||
@Override
|
||||
public boolean publish(MapObject object) {
|
||||
resultMatcher.exportObject(phrase, object);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Iterator<BinaryMapIndexReader> offlineIterator = phrase.getRadiusOfflineIndexes(DEFAULT_ADDRESS_BBOX_RADIUS * 5,
|
||||
SearchPhraseDataType.ADDRESS);
|
||||
String wordToSearch = phrase.getUnknownWordToSearch();
|
||||
|
@ -499,7 +515,7 @@ public class SearchCoreFactory {
|
|||
BinaryMapIndexReader r = offlineIterator.next();
|
||||
currentFile[0] = r;
|
||||
immediateResults.clear();
|
||||
SearchRequest<MapObject> req = BinaryMapIndexReader.buildAddressByNameRequest(rm, wordToSearch.toLowerCase(),
|
||||
SearchRequest<MapObject> req = BinaryMapIndexReader.buildAddressByNameRequest(rm, rawDataCollector, wordToSearch.toLowerCase(),
|
||||
phrase.isMainUnknownSearchWordComplete() ? StringMatcherMode.CHECK_EQUALS_FROM_SPACE
|
||||
: StringMatcherMode.CHECK_STARTS_FROM_SPACE);
|
||||
if (locSpecified) {
|
||||
|
@ -549,6 +565,22 @@ public class SearchCoreFactory {
|
|||
final NameStringMatcher nm = phrase.getMainUnknownNameStringMatcher();
|
||||
QuadRect bbox = phrase.getRadiusBBoxToSearch(BBOX_RADIUS_INSIDE);
|
||||
final Set<String> ids = new HashSet<String>();
|
||||
|
||||
ResultMatcher<Amenity> rawDataCollector = null;
|
||||
if (phrase.getSettings().isExportObjects()) {
|
||||
rawDataCollector = new ResultMatcher<Amenity>() {
|
||||
@Override
|
||||
public boolean publish(Amenity object) {
|
||||
resultMatcher.exportObject(phrase, object);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
SearchRequest<Amenity> req = BinaryMapIndexReader.buildSearchPoiRequest((int) bbox.centerX(),
|
||||
(int) bbox.centerY(), searchWord, (int) bbox.left, (int) bbox.right, (int) bbox.top,
|
||||
(int) bbox.bottom, new ResultMatcher<Amenity>() {
|
||||
|
@ -556,9 +588,6 @@ public class SearchCoreFactory {
|
|||
|
||||
@Override
|
||||
public boolean publish(Amenity object) {
|
||||
if (phrase.getSettings().isExportObjects()) {
|
||||
resultMatcher.exportObject(phrase, object);
|
||||
}
|
||||
if (limit++ > LIMIT) {
|
||||
return false;
|
||||
}
|
||||
|
@ -598,7 +627,7 @@ public class SearchCoreFactory {
|
|||
public boolean isCancelled() {
|
||||
return resultMatcher.isCancelled() && (limit < LIMIT);
|
||||
}
|
||||
});
|
||||
}, rawDataCollector);
|
||||
|
||||
while (offlineIterator.hasNext()) {
|
||||
BinaryMapIndexReader r = offlineIterator.next();
|
||||
|
@ -1007,6 +1036,8 @@ public class SearchCoreFactory {
|
|||
res.localeName += " " + ref;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
phrase.countUnknownWordsMatch(res, "", null, countExtraWords);
|
||||
}
|
||||
|
||||
res.object = object;
|
||||
|
|
|
@ -526,7 +526,7 @@ public class SearchPhrase {
|
|||
|
||||
public NameStringMatcher getFirstUnknownNameStringMatcher() {
|
||||
if (firstUnknownNameStringMatcher == null) {
|
||||
firstUnknownNameStringMatcher = getNameStringMatcher(firstUnknownSearchWord, lastUnknownSearchWordComplete);
|
||||
firstUnknownNameStringMatcher = getNameStringMatcher(firstUnknownSearchWord, isFirstUnknownSearchWordComplete());
|
||||
}
|
||||
return firstUnknownNameStringMatcher;
|
||||
}
|
||||
|
@ -793,6 +793,13 @@ public class SearchPhrase {
|
|||
return r;
|
||||
}
|
||||
|
||||
public String getLastUnknownSearchWord() {
|
||||
if(otherUnknownWords.size() > 0) {
|
||||
return otherUnknownWords.get(otherUnknownWords.size() - 1);
|
||||
}
|
||||
return firstUnknownSearchWord;
|
||||
}
|
||||
|
||||
|
||||
public int getRadiusSearch(int meters, int radiusLevel) {
|
||||
int res = meters;
|
||||
|
@ -877,4 +884,6 @@ public class SearchPhrase {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -23,8 +23,7 @@ public class SearchSettings {
|
|||
private ObjectType[] searchTypes;
|
||||
private boolean emptyQueryAllowed;
|
||||
private boolean sortByName;
|
||||
private SearchExportSettings exportSettings;
|
||||
//private SearchExportSettings exportSettings = new SearchExportSettings(false, false, -1);
|
||||
private SearchExportSettings exportSettings; // = new SearchExportSettings(true, true, -1);
|
||||
|
||||
public SearchSettings(SearchSettings s) {
|
||||
if(s != null) {
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
package net.osmand.search;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import net.osmand.ResultMatcher;
|
||||
import net.osmand.binary.BinaryMapIndexReader;
|
||||
import net.osmand.osm.AbstractPoiType;
|
||||
import net.osmand.osm.MapPoiTypes;
|
||||
import net.osmand.search.SearchUICore.SearchResultCollection;
|
||||
import net.osmand.search.SearchUICore.SearchResultMatcher;
|
||||
import net.osmand.search.core.SearchPhrase;
|
||||
import net.osmand.search.core.SearchResult;
|
||||
import net.osmand.search.core.SearchSettings;
|
||||
import net.osmand.util.Algorithms;
|
||||
import net.osmand.util.MapUtils;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
|
@ -19,23 +22,18 @@ import org.junit.runner.RunWith;
|
|||
import org.junit.runners.Parameterized;
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
|
||||
import net.osmand.OsmAndCollator;
|
||||
import net.osmand.ResultMatcher;
|
||||
import net.osmand.binary.BinaryMapIndexReader;
|
||||
import net.osmand.data.Amenity;
|
||||
import net.osmand.data.Building;
|
||||
import net.osmand.data.City;
|
||||
import net.osmand.data.MapObject;
|
||||
import net.osmand.data.Street;
|
||||
import net.osmand.osm.AbstractPoiType;
|
||||
import net.osmand.osm.MapPoiTypes;
|
||||
import net.osmand.search.SearchUICore.SearchResultCollection;
|
||||
import net.osmand.search.SearchUICore.SearchResultMatcher;
|
||||
import net.osmand.search.core.SearchPhrase;
|
||||
import net.osmand.search.core.SearchResult;
|
||||
import net.osmand.search.core.SearchSettings;
|
||||
import net.osmand.util.Algorithms;
|
||||
import net.osmand.util.MapUtils;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
|
||||
@RunWith(Parameterized.class)
|
||||
public class SearchUICoreTest {
|
||||
|
@ -94,11 +92,12 @@ public class SearchUICoreTest {
|
|||
@Test
|
||||
public void testSearch() throws IOException, JSONException {
|
||||
File jsonFile = testFile;
|
||||
File obfFile = new File(testFile.getParentFile(), testFile.getName().replace(".json", ".obf"));
|
||||
File obfZipFile = new File(testFile.getParentFile(), testFile.getName().replace(".json", ".obf.gz"));
|
||||
String sourceJsonText = Algorithms.getFileAsString(jsonFile);
|
||||
Assert.assertNotNull(sourceJsonText);
|
||||
Assert.assertTrue(sourceJsonText.length() > 0);
|
||||
|
||||
BinaryMapIndexReaderTest reader = new BinaryMapIndexReaderTest();
|
||||
JSONObject sourceJson = new JSONObject(sourceJsonText);
|
||||
JSONArray phrasesJson = sourceJson.optJSONArray("phrases");
|
||||
String singlePhrase = sourceJson.optString("phrase", null);
|
||||
|
@ -115,39 +114,23 @@ public class SearchUICoreTest {
|
|||
}
|
||||
}
|
||||
JSONObject settingsJson = sourceJson.getJSONObject("settings");
|
||||
if (sourceJson.has("amenities")) {
|
||||
JSONArray amenitiesArr = sourceJson.getJSONArray("amenities");
|
||||
List<Amenity> amenities = new ArrayList<>();
|
||||
for (int i = 0; i < amenitiesArr.length(); i++) {
|
||||
JSONObject amenityObj = amenitiesArr.getJSONObject(i);
|
||||
amenities.add(Amenity.parseJSON(amenityObj));
|
||||
BinaryMapIndexReader reader = null;
|
||||
boolean useData = settingsJson.optBoolean("useData", true);
|
||||
if (useData) {
|
||||
boolean obfZipFileExists = obfZipFile.exists();
|
||||
if (!obfZipFileExists) {
|
||||
System.out.println(String.format("Could not find obf file: %s", obfZipFile.getPath()));
|
||||
return;
|
||||
}
|
||||
reader.amenities = amenities;
|
||||
}
|
||||
if (sourceJson.has("cities")) {
|
||||
JSONArray citiesArr = sourceJson.getJSONArray("cities");
|
||||
List<City> cities = new ArrayList<>();
|
||||
List<City> initCities = new ArrayList<>();
|
||||
List<City> matchedCities = new ArrayList<>();
|
||||
List<City> streetCities = new ArrayList<>();
|
||||
for (int i = 0; i < citiesArr.length(); i++) {
|
||||
JSONObject cityObj = citiesArr.getJSONObject(i);
|
||||
final City city = City.parseJSON(cityObj);
|
||||
cities.add(city);
|
||||
if (cityObj.has("init")) {
|
||||
initCities.add(city);
|
||||
}
|
||||
if (cityObj.has("matchCity")) {
|
||||
matchedCities.add(city);
|
||||
}
|
||||
if (cityObj.has("matchStreet")) {
|
||||
streetCities.add(city);
|
||||
}
|
||||
}
|
||||
reader.cities = cities;
|
||||
reader.initCities = initCities;
|
||||
reader.matchedCities = matchedCities;
|
||||
reader.streetCities = streetCities;
|
||||
//Assert.assertTrue(obfZipFileExists);
|
||||
|
||||
GZIPInputStream gzin = new GZIPInputStream(new FileInputStream(obfZipFile));
|
||||
FileOutputStream fous = new FileOutputStream(obfFile);
|
||||
Algorithms.streamCopy(gzin, fous);
|
||||
fous.close();
|
||||
gzin.close();
|
||||
|
||||
reader = new BinaryMapIndexReader(new RandomAccessFile(obfFile.getPath(), "r"), obfFile);
|
||||
}
|
||||
List<List<String>> results = new ArrayList<>();
|
||||
for (int i = 0; i < phrases.size(); i++) {
|
||||
|
@ -166,7 +149,9 @@ public class SearchUICoreTest {
|
|||
}
|
||||
|
||||
SearchSettings s = SearchSettings.parseJSON(settingsJson);
|
||||
s.setOfflineIndexes(Collections.singletonList(reader));
|
||||
if (reader != null) {
|
||||
s.setOfflineIndexes(Collections.singletonList(reader));
|
||||
}
|
||||
|
||||
final SearchUICore core = new SearchUICore(MapPoiTypes.getDefault(), "en", false);
|
||||
core.init();
|
||||
|
@ -216,6 +201,8 @@ public class SearchUICoreTest {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
obfFile.delete();
|
||||
}
|
||||
|
||||
private void parseResults(JSONObject sourceJson, String tag, List<List<String>> results) {
|
||||
|
@ -329,116 +316,4 @@ public class SearchUICoreTest {
|
|||
return val;
|
||||
}
|
||||
};
|
||||
|
||||
private static class BinaryMapIndexReaderTest extends BinaryMapIndexReader {
|
||||
|
||||
List<Amenity> amenities = Collections.emptyList();
|
||||
List<City> cities = Collections.emptyList();
|
||||
List<City> initCities = Collections.emptyList();
|
||||
List<City> matchedCities = Collections.emptyList();
|
||||
List<City> streetCities = Collections.emptyList();
|
||||
|
||||
BinaryMapIndexReaderTest() throws IOException {
|
||||
super(null, null, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Amenity> searchPoiByName(SearchRequest<Amenity> req) throws IOException {
|
||||
for (Amenity amenity : amenities) {
|
||||
req.publish(amenity);
|
||||
}
|
||||
return req.getSearchResults();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Amenity> searchPoi(SearchRequest<Amenity> req) throws IOException {
|
||||
for (Amenity amenity : amenities) {
|
||||
req.publish(amenity);
|
||||
}
|
||||
return req.getSearchResults();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<City> getCities(SearchRequest<City> resultMatcher, int cityType) throws IOException {
|
||||
for (City city : initCities) {
|
||||
if (resultMatcher != null) {
|
||||
resultMatcher.publish(city);
|
||||
}
|
||||
}
|
||||
return initCities;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int preloadStreets(City c, SearchRequest<Street> resultMatcher) throws IOException {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preloadBuildings(Street s, SearchRequest<Building> resultMatcher) throws IOException {
|
||||
// cities must be filled with streets and buildings
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MapObject> searchAddressDataByName(SearchRequest<MapObject> req) throws IOException {
|
||||
for (City city : streetCities) {
|
||||
for (Street street : city.getStreets()) {
|
||||
req.publish(street);
|
||||
}
|
||||
}
|
||||
for (City city : matchedCities) {
|
||||
req.publish(city);
|
||||
}
|
||||
return req.getSearchResults();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRegionName() {
|
||||
return "Test region";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsPoiData(int left31x, int top31y, int right31x, int bottom31y) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsMapData() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsPoiData() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsRouteData() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsRouteData(int left31x, int top31y, int right31x, int bottom31y, int zoom) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsAddressData(int left31x, int top31y, int right31x, int bottom31y) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsMapData(int tile31x, int tile31y, int zoom) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsMapData(int left31x, int top31y, int right31x, int bottom31y, int zoom) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsAddressData() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
1
OsmAnd-java/src/test/resources/.gitignore
vendored
1
OsmAnd-java/src/test/resources/.gitignore
vendored
|
@ -1,5 +1,6 @@
|
|||
/*.json
|
||||
/osm_live/*.json
|
||||
/search/*
|
||||
*.obf
|
||||
*.osm
|
||||
phrases.xml
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,736 +0,0 @@
|
|||
{
|
||||
"settings": {
|
||||
"lat": "55.28666",
|
||||
"lon": "52.00556",
|
||||
"radiusLevel": 1,
|
||||
"totalLimit": -1,
|
||||
"lang": "",
|
||||
"transliterateIfMissing": false,
|
||||
"emptyQueryAllowed": false,
|
||||
"sortByName": false
|
||||
},
|
||||
"phrase": "parking ",
|
||||
"results": [
|
||||
"Parking (Personal transport) [[1, POI_TYPE, 1.000, 0.00 km]]",
|
||||
"для посетителей [[0, POI, 2.000, 0.03 km]]",
|
||||
"Parking [[0, POI, 2.000, 0.05 km]]",
|
||||
"Parking [[0, POI, 2.000, 0.11 km]]",
|
||||
"Parking [[0, POI, 2.000, 0.16 km]]",
|
||||
"Parking [[0, POI, 2.000, 0.17 km]]",
|
||||
"Parking [[0, POI, 2.000, 0.23 km]]",
|
||||
"Parking [[0, POI, 2.000, 0.35 km]]",
|
||||
"Parking [[0, POI, 2.000, 0.40 km]]",
|
||||
"Parking [[0, POI, 2.000, 0.48 km]]",
|
||||
"Parking [[0, POI, 2.000, 0.49 km]]",
|
||||
"Parking [[0, POI, 2.000, 0.55 km]]",
|
||||
"Автостоянка №1 [[0, POI, 2.000, 0.56 km]]",
|
||||
"Parking [[0, POI, 2.000, 0.58 km]]",
|
||||
"Parking [[0, POI, 2.000, 0.61 km]]",
|
||||
"Parking [[0, POI, 2.000, 0.72 km]]",
|
||||
"Parking [[0, POI, 2.000, 0.81 km]]",
|
||||
"Parking [[0, POI, 2.000, 0.81 km]]",
|
||||
"Parking [[0, POI, 2.000, 0.85 km]]",
|
||||
"для клиентов [[0, POI, 2.000, 0.89 km]]",
|
||||
"Parking [[0, POI, 2.000, 0.93 km]]",
|
||||
"Parking [[0, POI, 2.000, 0.94 km]]",
|
||||
"Заинская ГРЭС [[0, POI, 2.000, 1.01 km]]",
|
||||
"Parking [[0, POI, 2.000, 1.02 km]]",
|
||||
"Южная [[0, POI, 2.000, 1.03 km]]",
|
||||
"Parking [[0, POI, 2.000, 1.06 km]]",
|
||||
"Parking [[0, POI, 2.000, 1.09 km]]",
|
||||
"Parking [[0, POI, 2.000, 1.10 km]]",
|
||||
"Служебная [[0, POI, 2.000, 1.14 km]]",
|
||||
"Parking [[0, POI, 2.000, 1.20 km]]",
|
||||
"Parking [[0, POI, 2.000, 1.21 km]]",
|
||||
"Parking [[0, POI, 2.000, 1.36 km]]",
|
||||
"Parking [[0, POI, 2.000, 1.44 km]]",
|
||||
"Три тополя [[0, POI, 2.000, 1.47 km]]",
|
||||
"Parking [[0, POI, 2.000, 1.53 km]]",
|
||||
"Parking [[0, POI, 2.000, 1.56 km]]",
|
||||
"Parking [[0, POI, 2.000, 1.62 km]]",
|
||||
"Parking [[0, POI, 2.000, 1.85 km]]",
|
||||
"Штрафстоянка (Эвакуатор) [[0, POI, 2.000, 2.03 km]]",
|
||||
"Parking [[0, POI, 2.000, 2.05 km]]",
|
||||
"для регистрации в ГИБДД [[0, POI, 2.000, 2.06 km]]",
|
||||
"Parking [[0, POI, 2.000, 2.06 km]]",
|
||||
"Parking [[0, POI, 2.000, 2.07 km]]",
|
||||
"для техосмотра [[0, POI, 2.000, 2.09 km]]",
|
||||
"Parking [[0, POI, 2.000, 2.18 km]]",
|
||||
"Parking [[0, POI, 2.000, 2.55 km]]",
|
||||
"Parking [[0, POI, 2.000, 3.40 km]]",
|
||||
"Parking [[0, POI, 2.000, 3.41 km]]",
|
||||
"Parking [[0, POI, 2.000, 3.41 km]]",
|
||||
"Parking [[0, POI, 2.000, 3.45 km]]",
|
||||
"Parking [[0, POI, 2.000, 4.29 km]]",
|
||||
"Parking [[0, POI, 2.000, 6.71 km]]"
|
||||
],
|
||||
"amenities": [
|
||||
{
|
||||
"lat": "55.29801",
|
||||
"lon": "51.99100",
|
||||
"id": 881010149,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.29481",
|
||||
"lon": "51.98964",
|
||||
"id": 803545283,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Заинская ГРЭС",
|
||||
"lat": "55.28492",
|
||||
"lon": "52.02125",
|
||||
"id": 481494555,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_yes": "yes",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.29105",
|
||||
"lon": "51.99531",
|
||||
"id": 540237721,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.28683",
|
||||
"lon": "52.01479",
|
||||
"id": 888343263,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_unpaved": "unpaved",
|
||||
"access_permissive": "permissive",
|
||||
"supervised_yes": "yes"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.30317",
|
||||
"lon": "52.00192",
|
||||
"id": 1161722765,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"parking_surface": "surface",
|
||||
"operator": "cахарный завод"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "для техосмотра",
|
||||
"lat": "55.30439",
|
||||
"lon": "52.01634",
|
||||
"id": 484385195,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.28615",
|
||||
"lon": "52.00702",
|
||||
"id": 1040771455,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.28582",
|
||||
"lon": "52.00758",
|
||||
"id": 535925577,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.30950",
|
||||
"lon": "51.96954",
|
||||
"id": 1228158833,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.29345",
|
||||
"lon": "51.99385",
|
||||
"id": 535897911,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.30957",
|
||||
"lon": "52.00374",
|
||||
"id": 897019441,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.28602",
|
||||
"lon": "52.00908",
|
||||
"id": 268235957,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.28777",
|
||||
"lon": "51.99608",
|
||||
"id": 4410403520512,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"surface_unpaved": "unpaved",
|
||||
"supervised_yes": "yes",
|
||||
"parking_surface": "surface",
|
||||
"fee_yes": "yes",
|
||||
"capacity": "70"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.34092",
|
||||
"lon": "52.05172",
|
||||
"id": 2136388576,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.28271",
|
||||
"lon": "52.00248",
|
||||
"id": 536030271,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.28391",
|
||||
"lon": "52.00273",
|
||||
"id": 536035007,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Служебная",
|
||||
"lat": "55.28615",
|
||||
"lon": "52.02350",
|
||||
"id": 481491939,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"surface_asphalt": "asphalt",
|
||||
"fee_no": "no",
|
||||
"access_permissive": "permissive",
|
||||
"supervised_yes": "yes",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.30969",
|
||||
"lon": "51.96917",
|
||||
"id": 1228158821,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.31022",
|
||||
"lon": "51.97104",
|
||||
"id": 1228158819,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.29275",
|
||||
"lon": "51.99355",
|
||||
"id": 892959215,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "для посетителей",
|
||||
"lat": "55.28688",
|
||||
"lon": "52.00578",
|
||||
"id": 11390213698,
|
||||
"subType": "parking",
|
||||
"type": "transportation"
|
||||
},
|
||||
{
|
||||
"lat": "55.30838",
|
||||
"lon": "51.96767",
|
||||
"id": 1164434353,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Южная",
|
||||
"lat": "55.27739",
|
||||
"lon": "52.00544",
|
||||
"id": 641567205,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"surface_unpaved": "unpaved",
|
||||
"supervised_yes": "yes",
|
||||
"parking_surface": "surface",
|
||||
"fee_yes": "yes"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.28045",
|
||||
"lon": "51.99550",
|
||||
"id": 478137507,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"supervised_yes": "yes",
|
||||
"parking_surface": "surface",
|
||||
"fee_yes": "yes"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Автостоянка №1",
|
||||
"lat": "55.29028",
|
||||
"lon": "51.99934",
|
||||
"id": 502948005,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"surface_gravel": "gravel",
|
||||
"supervised_yes": "yes",
|
||||
"parking_surface": "surface",
|
||||
"fee_yes": "yes"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.27839",
|
||||
"lon": "52.00301",
|
||||
"id": 1168315587,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"parking_surface": "surface",
|
||||
"operator": "Заинская ЦРБ"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.30468",
|
||||
"lon": "52.01335",
|
||||
"id": 897014805,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.32509",
|
||||
"lon": "51.99930",
|
||||
"id": 1172111487,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Штрафстоянка (Эвакуатор)",
|
||||
"lat": "55.30439",
|
||||
"lon": "52.01346",
|
||||
"id": 5153530824,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"supervised_yes": "yes",
|
||||
"parking_surface": "surface",
|
||||
"fee_yes": "yes",
|
||||
"phone": "+7 (85558) 7-77-01"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Три тополя",
|
||||
"lat": "55.29666",
|
||||
"lon": "51.99048",
|
||||
"id": 642175341,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"surface_unpaved": "unpaved",
|
||||
"supervised_yes": "yes",
|
||||
"parking_surface": "surface",
|
||||
"fee_yes": "yes"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.29077",
|
||||
"lon": "52.00812",
|
||||
"id": 1168356553,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_yes": "yes",
|
||||
"parking_surface": "surface",
|
||||
"fee_yes": "yes"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.29429",
|
||||
"lon": "51.99190",
|
||||
"id": 893048919,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.29959",
|
||||
"lon": "52.00516",
|
||||
"id": 1022216961,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.28355",
|
||||
"lon": "51.99881",
|
||||
"id": 943827057,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.28651",
|
||||
"lon": "52.00479",
|
||||
"id": 905757839,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.28928",
|
||||
"lon": "52.00977",
|
||||
"id": 190467181,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_gravel": "gravel",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.28674",
|
||||
"lon": "52.00282",
|
||||
"id": 1168411743,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "для клиентов",
|
||||
"lat": "55.29116",
|
||||
"lon": "51.99394",
|
||||
"id": 821840897,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"surface_asphalt": "asphalt",
|
||||
"parking_surface": "surface",
|
||||
"access_customers": "customers"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.29068",
|
||||
"lon": "51.99490",
|
||||
"id": 540238031,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.28982",
|
||||
"lon": "51.98911",
|
||||
"id": 190489189,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.29341",
|
||||
"lon": "51.99072",
|
||||
"id": 806562897,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.28042",
|
||||
"lon": "52.00155",
|
||||
"id": 1159734951,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.30493",
|
||||
"lon": "52.01007",
|
||||
"id": 1172110357,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.30500",
|
||||
"lon": "52.01108",
|
||||
"id": 1172110359,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface",
|
||||
"capacity": "13"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.29816",
|
||||
"lon": "51.99222",
|
||||
"id": 1160388645,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.29015",
|
||||
"lon": "51.99366",
|
||||
"id": 503278061,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.30624",
|
||||
"lon": "52.00475",
|
||||
"id": 691494051,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface",
|
||||
"operator": "ЗЗМК - Тимер"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "для регистрации в ГИБДД",
|
||||
"lat": "55.30438",
|
||||
"lon": "52.01483",
|
||||
"id": 484385289,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.29258",
|
||||
"lon": "51.99188",
|
||||
"id": 892959265,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.28050",
|
||||
"lon": "52.00200",
|
||||
"id": 1159662915,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface",
|
||||
"capacity": "10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "55.29845",
|
||||
"lon": "51.99057",
|
||||
"id": 881010015,
|
||||
"subType": "parking",
|
||||
"type": "transportation",
|
||||
"additionalInfo": {
|
||||
"fee_no": "no",
|
||||
"surface_asphalt": "asphalt",
|
||||
"supervised_no": "no",
|
||||
"parking_surface": "surface"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"settings": {
|
||||
"lat": "55.75138",
|
||||
"lon": "37.62940",
|
||||
"radiusLevel": 1,
|
||||
"totalLimit": -1,
|
||||
"lang": "",
|
||||
"transliterateIfMissing": false,
|
||||
"emptyQueryAllowed": false,
|
||||
"sortByName": false
|
||||
},
|
||||
"phrase": "QHW6+CQ",
|
||||
"results": [
|
||||
"55.796062, 37.56194 [[1, LOCATION, 1.000, 6.52 km]]"
|
||||
],
|
||||
"cities": []
|
||||
}
|
|
@ -1,710 +0,0 @@
|
|||
{
|
||||
"settings": {
|
||||
"lat": "51.04933",
|
||||
"lon": "13.73815",
|
||||
"radiusLevel": 1,
|
||||
"totalLimit": -1,
|
||||
"lang": "",
|
||||
"transliterateIfMissing": false,
|
||||
"emptyQueryAllowed": false,
|
||||
"sortByName": false
|
||||
},
|
||||
"phrase": "Biergarten ",
|
||||
"results": [
|
||||
"Biergarten (Food) [[1, POI_TYPE, 1.000, 0.00 km]]",
|
||||
"Biergarten Italienisches Dörfchen [[1, POI, 2.000, 0.55 km]]",
|
||||
"Biergarten Narrenhäus'l [[1, POI, 2.000, 0.84 km]]",
|
||||
"Biergarten Elbsegler [[1, POI, 2.000, 0.89 km]]",
|
||||
"Biergarten Elbsegler [[1, POI, 2.000, 0.90 km]]",
|
||||
"Körnergarten [[1, POI, 2.000, 5.18 km]]",
|
||||
"Biergarten Goldener Anker [[1, POI, 2.000, 9.78 km]]",
|
||||
"Palais Bistro [[0, POI, 2.000, 0.29 km]]",
|
||||
"Augustus Garten am Narrenhäusl [[0, POI, 2.000, 0.88 km]]",
|
||||
"Zum Schießhaus [[0, POI, 2.000, 0.96 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 1.24 km]]",
|
||||
"Wachstube [[0, POI, 2.000, 1.24 km]]",
|
||||
"Torwirtschaft [[0, POI, 2.000, 1.27 km]]",
|
||||
"Altes Wettbüro [[0, POI, 2.000, 1.77 km]]",
|
||||
"Bottoms Up [[0, POI, 2.000, 2.16 km]]",
|
||||
"Louisengarten [[0, POI, 2.000, 2.20 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 2.28 km]]",
|
||||
"Fährgarten Johannstadt [[0, POI, 2.000, 2.42 km]]",
|
||||
"Carolaschlösschen [[0, POI, 2.000, 2.53 km]]",
|
||||
"Alt-Dresden [[0, POI, 2.000, 2.75 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 2.90 km]]",
|
||||
"Café & Restaurant Saite [[0, POI, 2.000, 3.09 km]]",
|
||||
"Brauhaus am Waldschlößchen [[0, POI, 2.000, 3.45 km]]",
|
||||
"Brauhaus Watzke [[0, POI, 2.000, 3.51 km]]",
|
||||
"el Horst [[0, POI, 2.000, 3.67 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 3.74 km]]",
|
||||
"Spitzwegerich [[0, POI, 2.000, 3.81 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 3.88 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 4.46 km]]",
|
||||
"Trobischhof [[0, POI, 2.000, 4.48 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 4.80 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 4.91 km]]",
|
||||
"Schillergarten [[0, POI, 2.000, 4.97 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 5.11 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 5.13 km]]",
|
||||
"Demnitz Elbegarten [[0, POI, 2.000, 5.16 km]]",
|
||||
"Körnergarten [[0, POI, 2.000, 5.18 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 5.31 km]]",
|
||||
"Trachauer Sommergarten [[0, POI, 2.000, 5.31 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 5.91 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 6.12 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 6.26 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 6.42 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 6.88 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 7.11 km]]",
|
||||
"Straußenwirtschaft Weingut Pesterwitz [[0, POI, 2.000, 7.14 km]]",
|
||||
"Klotzscher Sommerwirtschaft [[0, POI, 2.000, 7.16 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 7.17 km]]",
|
||||
"Zacke [[0, POI, 2.000, 8.20 km]]",
|
||||
"Weingut Seifert [[0, POI, 2.000, 8.50 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 8.82 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 9.11 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 9.23 km]]",
|
||||
"Landgut Hofewiese [[0, POI, 2.000, 9.40 km]]",
|
||||
"Biergarten Goldener Anker [[0, POI, 2.000, 9.78 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 10.00 km]]",
|
||||
"Biergarten [[0, POI, 2.000, 10.22 km]]",
|
||||
"Besenwirtschaft Steinrücken [[0, POI, 2.000, 10.85 km]]"
|
||||
],
|
||||
"amenities": [
|
||||
{
|
||||
"lat": "51.02489",
|
||||
"lon": "13.69860",
|
||||
"id": 244538865,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"surface_fine_gravel": "fine_gravel"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "51.09478",
|
||||
"lon": "13.84153",
|
||||
"id": 865332598,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"operator": "Einkehr"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "51.01123",
|
||||
"lon": "13.67918",
|
||||
"id": 9712288200,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"website": "http://www.zur-linde-freital.de/",
|
||||
"operator": "Zur Linde",
|
||||
"image": "http://commons.wikimedia.org/wiki/File:Hotel_und_Gasthaus_Zur_Linde_Freital-Birkigt.jpg"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Altes Wettbüro",
|
||||
"lat": "51.06472",
|
||||
"lon": "13.74467",
|
||||
"id": 11451975032,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"openingHours": "Tu-Sa 17:00-22:00",
|
||||
"additionalInfo": {
|
||||
"wheelchair_limited": "limited",
|
||||
"outdoor_seating_yes": "yes",
|
||||
"outdoor_seating_filter_yes": "yes",
|
||||
"opening_hours": "Tu-Sa 17:00-22:00",
|
||||
"website": "http://www.altes-wettbuero.de",
|
||||
"phone": "+49 351 6588983",
|
||||
"operator": "Falk Gruß"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Carolaschlösschen",
|
||||
"lat": "51.03341",
|
||||
"lon": "13.76392",
|
||||
"id": 3704353318,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"openingHours": "Mo-Su 11:00-24:00",
|
||||
"additionalInfo": {
|
||||
"wheelchair_limited": "limited",
|
||||
"opening_hours": "Mo-Su 11:00-24:00",
|
||||
"facebook": "https://www.facebook.com/carolaschloesschen/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "51.01251",
|
||||
"lon": "13.69407",
|
||||
"id": 562115695,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance"
|
||||
},
|
||||
{
|
||||
"name": "Torwirtschaft",
|
||||
"lat": "51.04156",
|
||||
"lon": "13.75139",
|
||||
"id": 517007905,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"wheelchair_yes": "yes",
|
||||
"website": "http://www.torwirtschaft-dresden.de",
|
||||
"facebook": "https://www.facebook.com/Torwirtschaft-der-Biergarten-f%C3%BCr-alle-Dynamofans-168677023169963/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Biergarten Italienisches Dörfchen",
|
||||
"lat": "51.05429",
|
||||
"lon": "13.73759",
|
||||
"id": 486232011,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance"
|
||||
},
|
||||
{
|
||||
"lat": "51.04261",
|
||||
"lon": "13.75229",
|
||||
"id": 98518191,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"wheelchair_yes": "yes"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Körnergarten",
|
||||
"names": {
|
||||
"prefix": "Biergarten"
|
||||
},
|
||||
"lat": "51.05316",
|
||||
"lon": "13.81192",
|
||||
"id": 3704353594,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"openingHours": "Mo-Su 11:00-24:00",
|
||||
"additionalInfo": {
|
||||
"wheelchair_limited": "limited",
|
||||
"opening_hours": "Mo-Su 11:00-24:00",
|
||||
"website": "http://www.koernergarten.de/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "51.06397",
|
||||
"lon": "13.79748",
|
||||
"id": 670742479,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance"
|
||||
},
|
||||
{
|
||||
"name": "Weingut Seifert",
|
||||
"lat": "51.11134",
|
||||
"lon": "13.66701",
|
||||
"id": 789740008,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"note": "not really a 'biergarten' :)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "50.98710",
|
||||
"lon": "13.65086",
|
||||
"id": 9037536542,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"operator": "Zum Gründl"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "51.10538",
|
||||
"lon": "13.62622",
|
||||
"id": 9289210778,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"operator": "Zum Bürgergarten"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "51.09459",
|
||||
"lon": "13.84170",
|
||||
"id": 5598697742,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"operator": "Einkehr"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Trobischhof",
|
||||
"lat": "51.08649",
|
||||
"lon": "13.71338",
|
||||
"id": 409847251,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"wheelchair_limited": "limited"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Demnitz Elbegarten",
|
||||
"lat": "51.05328",
|
||||
"lon": "13.81175",
|
||||
"id": 771102016,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"wheelchair_no": "no",
|
||||
"cuisine_german": "german",
|
||||
"website": "http://www.elbegarten.de"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Augustus Garten am Narrenhäusl",
|
||||
"lat": "51.05697",
|
||||
"lon": "13.74166",
|
||||
"id": 465538291,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance"
|
||||
},
|
||||
{
|
||||
"lat": "51.01529",
|
||||
"lon": "13.65107",
|
||||
"id": 7482890514,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"operator": "Burgwartschänke"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "el Horst",
|
||||
"lat": "51.04361",
|
||||
"lon": "13.78979",
|
||||
"id": 559979958,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"openingHours": "Oct-Apr: Mo-Fr 17:00-18:00+, Oct-Apr: Sa,PH 11:30-18:00+, May-Sep: Mo-Fr 15:00-18:00+, May-Sep: Sa,PH 11:30-18:00+",
|
||||
"additionalInfo": {
|
||||
"opening_hours": "Oct-Apr: Mo-Fr 17:00-18:00+, Oct-Apr: Sa,PH 11:30-18:00+, May-Sep: Mo-Fr 15:00-18:00+, May-Sep: Sa,PH 11:30-18:00+"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "51.07376",
|
||||
"lon": "13.70135",
|
||||
"id": 553613482,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"operator": "Wirtshaus Lindenschänke"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Wachstube",
|
||||
"lat": "51.04254",
|
||||
"lon": "13.75222",
|
||||
"id": 46060263,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"openingHours": "11:00+",
|
||||
"additionalInfo": {
|
||||
"wheelchair_no": "no",
|
||||
"opening_hours": "11:00+",
|
||||
"website": "https://www.torwirtschaft-dresden.de/wachstube/restaurant.php",
|
||||
"phone": "+49 351 4466975",
|
||||
"image": "https://commons.wikimedia.org/wiki/File:Torhaus_N_Grosser_Garten_Dresden-2.jpg",
|
||||
"wheelchair_description:de": "Zugang ins Gebäude nur über Stufen",
|
||||
"height": "5.7",
|
||||
"facebook": "https://www.facebook.com/Wachstube-im-Gro%C3%9Fen-Garten-Dresden-144180698984577/",
|
||||
"email": "info@wachstube-dresden.de"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "51.09050",
|
||||
"lon": "13.70555",
|
||||
"id": 6300849046,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"operator": "Bäckerei Werner"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Biergarten Elbsegler",
|
||||
"lat": "51.05731",
|
||||
"lon": "13.73973",
|
||||
"id": 465318113,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"wheelchair_limited": "limited"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Straußenwirtschaft Weingut Pesterwitz",
|
||||
"lat": "51.02883",
|
||||
"lon": "13.64144",
|
||||
"id": 478369183,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"website": "https://www.gut-pesterwitz.de/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Schillergarten",
|
||||
"lat": "51.05228",
|
||||
"lon": "13.80908",
|
||||
"id": 493702544,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"openingHours": "Mo-Su 11:00-01:00",
|
||||
"additionalInfo": {
|
||||
"wheelchair_yes": "yes",
|
||||
"opening_hours": "Mo-Su 11:00-01:00"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "51.04111",
|
||||
"lon": "13.80554",
|
||||
"id": 5837244174,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"operator": "Astloch"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Spitzwegerich",
|
||||
"lat": "51.07767",
|
||||
"lon": "13.70757",
|
||||
"id": 412610355,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"wheelchair_yes": "yes",
|
||||
"toilets_wheelchair_no": "no"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Biergarten Goldener Anker",
|
||||
"lat": "51.10399",
|
||||
"lon": "13.62850",
|
||||
"id": 143015201,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"openingHours": "Tu-Su,PH 11:00-21:00",
|
||||
"additionalInfo": {
|
||||
"wheelchair_yes": "yes",
|
||||
"opening_hours": "Tu-Su,PH 11:00-21:00"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Bottoms Up",
|
||||
"lat": "51.06516",
|
||||
"lon": "13.75615",
|
||||
"id": 1394136626,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance"
|
||||
},
|
||||
{
|
||||
"name": "Biergarten Narrenhäus'l",
|
||||
"lat": "51.05666",
|
||||
"lon": "13.74130",
|
||||
"id": 466763007,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance"
|
||||
},
|
||||
{
|
||||
"name": "Zum Schießhaus",
|
||||
"lat": "51.05464",
|
||||
"lon": "13.72727",
|
||||
"id": 326416539,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"openingHours": "Mo-Su,PH 11:00-23:00",
|
||||
"additionalInfo": {
|
||||
"wheelchair_yes": "yes",
|
||||
"toilets_wheelchair_no": "no",
|
||||
"opening_hours": "Mo-Su,PH 11:00-23:00"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Palais Bistro",
|
||||
"lat": "51.05182",
|
||||
"lon": "13.73682",
|
||||
"id": 501015667,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"openingHours": "Apr-Oct: Mo-Su 11:00-24:00, Nov-Mar: Mo-Th 12:00-14:30,17:30-24:00, Nov-Mar: Fr-Su 12:00-24:00",
|
||||
"additionalInfo": {
|
||||
"wheelchair_yes": "yes",
|
||||
"opening_hours": "Apr-Oct: Mo-Su 11:00-24:00, Nov-Mar: Mo-Th 12:00-14:30,17:30-24:00, Nov-Mar: Fr-Su 12:00-24:00"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Brauhaus am Waldschlößchen",
|
||||
"lat": "51.06778",
|
||||
"lon": "13.77786",
|
||||
"id": 594989978,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"openingHours": "Mo-Su 11:00-01:00",
|
||||
"additionalInfo": {
|
||||
"wheelchair_limited": "limited",
|
||||
"opening_hours": "Mo-Su 11:00-01:00"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "51.00222",
|
||||
"lon": "13.68504",
|
||||
"id": 2469999180,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance"
|
||||
},
|
||||
{
|
||||
"name": "Biergarten Elbsegler",
|
||||
"lat": "51.05738",
|
||||
"lon": "13.73913",
|
||||
"id": 466539133,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance"
|
||||
},
|
||||
{
|
||||
"lat": "51.01010",
|
||||
"lon": "13.66208",
|
||||
"id": 7987508388,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"wheelchair_yes": "yes",
|
||||
"operator": "Zum goldenen Löwen"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "50.99476",
|
||||
"lon": "13.72701",
|
||||
"id": 6765029580,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"operator": "Eutschützer Mühle"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "50.99295",
|
||||
"lon": "13.64362",
|
||||
"id": 6065174964,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"operator": "Alte Schmiede"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Louisengarten",
|
||||
"lat": "51.06681",
|
||||
"lon": "13.75278",
|
||||
"id": 68516655,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"openingHours": "Apr-Sep Su-Th 16:00+; Apr-Sep Fr,Sa 15:00+ || off \"Bei unfreundlichem Wetter\"",
|
||||
"additionalInfo": {
|
||||
"wheelchair_no": "no",
|
||||
"opening_hours": "Apr-Sep Su-Th 16:00+; Apr-Sep Fr,Sa 15:00+ || off \"Bei unfreundlichem Wetter\"",
|
||||
"website": "http://www.biergarten-dresden.de",
|
||||
"note": "Neustädter Winter Hüttn von Oktober-Dezember",
|
||||
"alt_name": "Neustädter Winter Hüttn"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "51.00871",
|
||||
"lon": "13.65959",
|
||||
"id": 9237211698,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"wheelchair_yes": "yes",
|
||||
"operator": "Akropolis"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "51.03435",
|
||||
"lon": "13.76042",
|
||||
"id": 595971770,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"openingHours": "Apr-Oct: Mo-Fr 11:00-19:00; Sa-Su 10:00-19:00; PH 10:00-19:00",
|
||||
"additionalInfo": {
|
||||
"wheelchair_yes": "yes",
|
||||
"opening_hours": "Apr-Oct: Mo-Fr 11:00-19:00; Sa-Su 10:00-19:00; PH 10:00-19:00",
|
||||
"website": "https://www.grosser-garten-dresden.de/de/gaesteservice/gastronomie-shop/",
|
||||
"phone": "+49 152 37 00 67 53"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Landgut Hofewiese",
|
||||
"lat": "51.10989",
|
||||
"lon": "13.83207",
|
||||
"id": 8455509378,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"wheelchair_yes": "yes"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Café & Restaurant Saite",
|
||||
"lat": "51.07636",
|
||||
"lon": "13.74825",
|
||||
"id": 577481323,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"openingHours": "Mo-Fr 18:00-24:00, Su 10:00-15:00",
|
||||
"additionalInfo": {
|
||||
"wheelchair_limited": "limited",
|
||||
"opening_hours": "Mo-Fr 18:00-24:00, Su 10:00-15:00"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Alt-Dresden",
|
||||
"lat": "51.04977",
|
||||
"lon": "13.69881",
|
||||
"id": 970594717,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"wheelchair_limited": "limited",
|
||||
"phone": "0351 4135133"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "51.08677",
|
||||
"lon": "13.70081",
|
||||
"id": 413620001,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance"
|
||||
},
|
||||
{
|
||||
"lat": "50.98618",
|
||||
"lon": "13.63208",
|
||||
"id": 10355747978,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"operator": "Hirschbergschenke"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Fährgarten Johannstadt",
|
||||
"lat": "51.06151",
|
||||
"lon": "13.76679",
|
||||
"id": 4415013507072,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"wheelchair_yes": "yes",
|
||||
"outdoor_seating_yes": "yes",
|
||||
"outdoor_seating_filter_yes": "yes",
|
||||
"website": "http://www.faehrgarten.de/",
|
||||
"phone": "+49 351 4596262",
|
||||
"brewery_additional": "Radeberger",
|
||||
"email": "info@faehrgarten.de"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "51.02343",
|
||||
"lon": "13.73347",
|
||||
"id": 4563637454,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance"
|
||||
},
|
||||
{
|
||||
"name": "Besenwirtschaft Steinrücken",
|
||||
"lat": "51.11590",
|
||||
"lon": "13.62457",
|
||||
"id": 7474665554,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"website": "http://www.besenwirtschaft-steinruecken.de/index.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "51.05181",
|
||||
"lon": "13.81396",
|
||||
"id": 9819148822,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"operator": "WSV \"Am Blauen Wunder\""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Zacke",
|
||||
"lat": "51.01300",
|
||||
"lon": "13.63618",
|
||||
"id": 7498805230,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance"
|
||||
},
|
||||
{
|
||||
"name": "Klotzscher Sommerwirtschaft",
|
||||
"lat": "51.11072",
|
||||
"lon": "13.76879",
|
||||
"id": 717794449,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"openingHours": "Mo-Fr 17:00-23:00; Sa-Su 11:00-23:00; Nov-Mar off",
|
||||
"additionalInfo": {
|
||||
"opening_hours": "Mo-Fr 17:00-23:00; Sa-Su 11:00-23:00; Nov-Mar off",
|
||||
"website": "http://klotzschersommerwirtschaft.de",
|
||||
"phone": "+49 351 8804570",
|
||||
"fax": "+49 351 8902050",
|
||||
"email": "Kontakt@klotzscher-sommerwirtschaft.de",
|
||||
"capacity": "20"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Brauhaus Watzke",
|
||||
"lat": "51.07744",
|
||||
"lon": "13.71540",
|
||||
"id": 397976739,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"additionalInfo": {
|
||||
"wheelchair_limited": "limited",
|
||||
"toilets_wheelchair_no": "no"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Trachauer Sommergarten",
|
||||
"lat": "51.09166",
|
||||
"lon": "13.70289",
|
||||
"id": 1822089672,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"openingHours": "Mo-Su 17:00-21:00",
|
||||
"additionalInfo": {
|
||||
"opening_hours": "Mo-Su 17:00-21:00",
|
||||
"note": "Auch im Winter geöffnet"
|
||||
}
|
||||
},
|
||||
{
|
||||
"lat": "51.06520",
|
||||
"lon": "13.82406",
|
||||
"id": 11565282314,
|
||||
"subType": "biergarten",
|
||||
"type": "sustenance",
|
||||
"openingHours": "seasonal",
|
||||
"additionalInfo": {
|
||||
"outdoor_seating_yes": "yes",
|
||||
"outdoor_seating_filter_yes": "yes",
|
||||
"opening_hours": "seasonal"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
{
|
||||
"settings": {
|
||||
"lat": "51.04933",
|
||||
"lon": "13.73815",
|
||||
"radiusLevel": 1,
|
||||
"totalLimit": -1,
|
||||
"lang": "",
|
||||
"transliterateIfMissing": false,
|
||||
"emptyQueryAllowed": false,
|
||||
"sortByName": false
|
||||
},
|
||||
"phrase": ["Fuel", "Fuel "],
|
||||
"results": [[
|
||||
"Aircraft fuel station (Filling station) [[1, POI_TYPE, 1.000, 0.00 km]]",
|
||||
"Gas station (Filling station) [[1, POI_TYPE, 1.000, 0.00 km]]",
|
||||
"Gas station for boats (Filling station) [[1, POI_TYPE, 1.000, 0.00 km]]"
|
||||
],
|
||||
[
|
||||
"Aircraft fuel station (Filling station) [[1, POI_TYPE, 1.000, 0.00 km]]",
|
||||
"Gas station (Filling station) [[1, POI_TYPE, 1.000, 0.00 km]]",
|
||||
"Gas station for boats (Filling station) [[1, POI_TYPE, 1.000, 0.00 km]]"
|
||||
]],
|
||||
"amenities": [],
|
||||
"cities": []
|
||||
}
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -289,6 +289,10 @@ public class PointDescription {
|
|||
return POINT_TYPE_CUSTOM_POI_FILTER.equals(type);
|
||||
}
|
||||
|
||||
public boolean isGpxPoint() {
|
||||
return POINT_TYPE_GPX.equals(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
|
|
|
@ -673,6 +673,11 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
|
|||
}
|
||||
if (trackDetailsMenu.isVisible()) {
|
||||
trackDetailsMenu.hide(true);
|
||||
if (mapContextMenu.isActive() && mapContextMenu.getPointDescription() != null
|
||||
&& mapContextMenu.getPointDescription().isGpxPoint()) {
|
||||
mapContextMenu.show();
|
||||
return;
|
||||
}
|
||||
if (prevActivityIntent == null) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,6 @@ public class SelectedGpxMenuController extends MenuController {
|
|||
public void buttonPressed() {
|
||||
Intent intent = new Intent(mapActivity, mapActivity.getMyApplication().getAppCustomization().getTrackActivity());
|
||||
intent.putExtra(TrackActivity.TRACK_FILE_NAME, item.getGpxFile().path);
|
||||
intent.putExtra(TrackActivity.OPEN_TRACKS_LIST, true);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
||||
mapActivity.startActivity(intent);
|
||||
}
|
||||
|
|
|
@ -212,8 +212,8 @@ public class TrackDetailsMenu {
|
|||
}
|
||||
}
|
||||
|
||||
public void updateInfo(final View main) {
|
||||
updateView(main);
|
||||
public void updateInfo(final View main, boolean forceFitTrackOnMap) {
|
||||
updateView(main, forceFitTrackOnMap);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@ -485,7 +485,7 @@ public class TrackDetailsMenu {
|
|||
return xAxisPoints;
|
||||
}
|
||||
|
||||
private void updateView(final View parentView) {
|
||||
private void updateView(final View parentView, boolean forceFitTrackOnMap) {
|
||||
MapActivity mapActivity = getMapActivity();
|
||||
GpxDisplayItem gpxItem = getGpxItem();
|
||||
if (mapActivity == null || gpxItem == null) {
|
||||
|
@ -724,7 +724,7 @@ public class TrackDetailsMenu {
|
|||
xAxisArrow.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
refreshChart(chart, true);
|
||||
refreshChart(chart, forceFitTrackOnMap);
|
||||
}
|
||||
|
||||
private void updateChart(LineChart chart) {
|
||||
|
|
|
@ -23,6 +23,7 @@ import net.osmand.plus.R;
|
|||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.base.BaseOsmAndFragment;
|
||||
import net.osmand.plus.helpers.AndroidUiHelper;
|
||||
import net.osmand.plus.mapcontextmenu.MapContextMenu;
|
||||
|
||||
public class TrackDetailsMenuFragment extends BaseOsmAndFragment {
|
||||
public static final String TAG = "TrackDetailsMenuFragment";
|
||||
|
@ -91,14 +92,20 @@ public class TrackDetailsMenuFragment extends BaseOsmAndFragment {
|
|||
});
|
||||
}
|
||||
|
||||
updateInfo();
|
||||
MapContextMenu contextMenu = mapActivity.getContextMenu();
|
||||
final boolean forceFitTrackOnMap;
|
||||
if (contextMenu.isActive()) {
|
||||
forceFitTrackOnMap = !(contextMenu.getPointDescription() != null && contextMenu.getPointDescription().isGpxPoint());
|
||||
} else {
|
||||
forceFitTrackOnMap = true;
|
||||
}
|
||||
updateInfo(forceFitTrackOnMap);
|
||||
|
||||
ViewTreeObserver vto = mainView.getViewTreeObserver();
|
||||
vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||
|
||||
@Override
|
||||
public void onGlobalLayout() {
|
||||
|
||||
ViewTreeObserver obs = mainView.getViewTreeObserver();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||
obs.removeOnGlobalLayoutListener(this);
|
||||
|
@ -106,7 +113,7 @@ public class TrackDetailsMenuFragment extends BaseOsmAndFragment {
|
|||
obs.removeGlobalOnLayoutListener(this);
|
||||
}
|
||||
if (getMapActivity() != null) {
|
||||
updateInfo();
|
||||
updateInfo(forceFitTrackOnMap);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -165,7 +172,11 @@ public class TrackDetailsMenuFragment extends BaseOsmAndFragment {
|
|||
}
|
||||
|
||||
public void updateInfo() {
|
||||
menu.updateInfo(mainView);
|
||||
updateInfo(true);
|
||||
}
|
||||
|
||||
public void updateInfo(boolean forceFitTrackOnMap) {
|
||||
menu.updateInfo(mainView, forceFitTrackOnMap);
|
||||
applyDayNightMode();
|
||||
}
|
||||
|
||||
|
|
|
@ -604,8 +604,8 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
|
|||
for (SelectedGpxFile selectedGpxFile : selectedGpxFiles) {
|
||||
List<TrkSegment> segments = selectedGpxFile.getPointsToDisplay();
|
||||
for (TrkSegment segment : segments) {
|
||||
boolean nearSegment = isPointNearSegment(tb, segment.points, r, mx, my);
|
||||
if (nearSegment) {
|
||||
QuadRect trackBounds = GPXUtilities.calculateBounds(segment.points);
|
||||
if (QuadRect.trivialOverlap(tb.getLatLonBounds(), trackBounds) && isPointNearSegment(tb, segment.points, r, mx, my)) {
|
||||
res.add(selectedGpxFile);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import android.graphics.Paint;
|
|||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import net.osmand.GPXUtilities;
|
||||
import net.osmand.GPXUtilities.WptPt;
|
||||
import net.osmand.data.QuadRect;
|
||||
import net.osmand.data.RotatedTileBox;
|
||||
|
@ -61,10 +62,10 @@ public class Renderable {
|
|||
protected AsynchronousResampler culler = null; // The currently active resampler
|
||||
protected Paint paint = null; // MUST be set by 'updateLocalPaint' before use
|
||||
|
||||
public RenderableSegment(List <WptPt> points, double segmentSize) {
|
||||
public RenderableSegment(List<WptPt> points, double segmentSize) {
|
||||
this.points = points;
|
||||
calculateBounds(points);
|
||||
this.segmentSize = segmentSize;
|
||||
trackBounds = GPXUtilities.calculateBounds(points);
|
||||
}
|
||||
|
||||
protected void updateLocalPaint(Paint p) {
|
||||
|
@ -90,23 +91,6 @@ public class Renderable {
|
|||
}
|
||||
}
|
||||
|
||||
private void calculateBounds(List<WptPt> pts) {
|
||||
trackBounds = new QuadRect(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY,
|
||||
Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY);
|
||||
updateBounds(pts, 0);
|
||||
}
|
||||
|
||||
protected void updateBounds(List<WptPt> pts, int startIndex) {
|
||||
pointSize = pts.size();
|
||||
for (int i = startIndex; i < pointSize; i++) {
|
||||
WptPt pt = pts.get(i);
|
||||
trackBounds.right = Math.max(trackBounds.right, pt.lon);
|
||||
trackBounds.left = Math.min(trackBounds.left, pt.lon);
|
||||
trackBounds.top = Math.max(trackBounds.top, pt.lat);
|
||||
trackBounds.bottom = Math.min(trackBounds.bottom, pt.lat);
|
||||
}
|
||||
}
|
||||
|
||||
public void setRDP(List<WptPt> cull) {
|
||||
culled = cull;
|
||||
}
|
||||
|
@ -198,7 +182,9 @@ public class Renderable {
|
|||
|
||||
@Override public void drawSegment(double zoom, Paint p, Canvas canvas, RotatedTileBox tileBox) {
|
||||
if (points.size() != pointSize) {
|
||||
updateBounds(points, pointSize);
|
||||
int prevSize = pointSize;
|
||||
pointSize = points.size();
|
||||
GPXUtilities.updateBounds(trackBounds, points, prevSize);
|
||||
}
|
||||
drawSingleSegment(zoom, p, canvas, tileBox);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue