Fix coastlines issues
This commit is contained in:
parent
f6fc888186
commit
49c8d80326
2 changed files with 10 additions and 4 deletions
|
@ -365,14 +365,16 @@ public class MapRenderRepositories {
|
|||
boolean addBasemapCoastlines = true;
|
||||
boolean emptyData = zoom > BASEMAP_ZOOM && tempResult.isEmpty() && coastLines.isEmpty();
|
||||
boolean basemapMissing = zoom <= BASEMAP_ZOOM && basemapCoastLines.isEmpty() && mi == null;
|
||||
|
||||
boolean detailedLandData = zoom >= 14 && tempResult.size() > 0;
|
||||
if(!coastLines.isEmpty()) {
|
||||
long ms = System.currentTimeMillis();
|
||||
boolean coastlinesWereAdded = processCoastlines(coastLines, leftX, rightX, bottomY, topY, zoom,
|
||||
basemapCoastLines.isEmpty(), true, tempResult);
|
||||
addBasemapCoastlines = !coastlinesWereAdded || zoom <= BASEMAP_ZOOM;
|
||||
addBasemapCoastlines = (!coastlinesWereAdded && !detailedLandData) || zoom <= BASEMAP_ZOOM;
|
||||
coastlineTime = "(coastline " + (System.currentTimeMillis() - ms) + " ms )";
|
||||
}
|
||||
} else {
|
||||
addBasemapCoastlines = !detailedLandData;
|
||||
}
|
||||
if(addBasemapCoastlines){
|
||||
long ms = System.currentTimeMillis();
|
||||
boolean coastlinesWereAdded = processCoastlines(basemapCoastLines, leftX, rightX, bottomY, topY, zoom,
|
||||
|
|
|
@ -983,11 +983,15 @@ ResultPublisher* searchObjectsForRendering(SearchQuery* q, bool skipDuplicates,
|
|||
bool land = q->mixed;
|
||||
bool addBasemapCoastlines = true;
|
||||
bool emptyData = q->zoom > BASEMAP_ZOOM && tempResult.empty() && coastLines.empty();
|
||||
// determine if there are enough objects like land/lake..
|
||||
bool basemapMissing = q->zoom <= BASEMAP_ZOOM && basemapCoastLines.empty() && !basemapExists;
|
||||
bool detailedLandData = q->zoom >= 14 && tempResult.size() > 0;
|
||||
if (!coastLines.empty()) {
|
||||
bool coastlinesWereAdded = processCoastlines(coastLines, q->left, q->right, q->bottom, q->top, q->zoom,
|
||||
basemapCoastLines.empty(), true, tempResult);
|
||||
addBasemapCoastlines = !coastlinesWereAdded || q->zoom <= BASEMAP_ZOOM;
|
||||
addBasemapCoastlines = (!coastlinesWereAdded && !detailedLandData) || q->zoom <= BASEMAP_ZOOM;
|
||||
} else {
|
||||
addBasemapCoastlines = !detailedLandData;
|
||||
}
|
||||
if (addBasemapCoastlines) {
|
||||
addBasemapCoastlines = false;
|
||||
|
|
Loading…
Reference in a new issue