Fix #5502
This commit is contained in:
parent
c9f8057b13
commit
fd16da1f81
2 changed files with 10 additions and 2 deletions
|
@ -313,6 +313,9 @@ public abstract class OsmandMapLayer {
|
|||
}
|
||||
}
|
||||
|
||||
public void layerOnPreExecute() {
|
||||
}
|
||||
|
||||
public void layerOnPostExecute() {
|
||||
}
|
||||
|
||||
|
@ -350,6 +353,7 @@ public abstract class OsmandMapLayer {
|
|||
@Override
|
||||
protected void onPreExecute() {
|
||||
currentTask = this;
|
||||
layerOnPreExecute();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -94,16 +94,20 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
|
|||
return super.isInterrupted();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void layerOnPreExecute() {
|
||||
calculatedFilters = new TreeSet<>(filters);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void layerOnPostExecute() {
|
||||
filters = calculatedFilters;
|
||||
activity.getMapView().refreshMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<Amenity> calculateResult(RotatedTileBox tileBox) {
|
||||
QuadRect latLonBounds = tileBox.getLatLonBounds();
|
||||
calculatedFilters = filters;
|
||||
if (calculatedFilters.isEmpty() || latLonBounds == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue