Skip to content

Commit

Permalink
Merge pull request #20962 from osmandapp/issue_20938
Browse files Browse the repository at this point in the history
Avoid osmand_change:delete in within polygons
  • Loading branch information
Chumva authored Oct 1, 2024
2 parents ba33ece + 5014f5d commit 0cfd0d2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion OsmAnd/src/net/osmand/core/android/MapRendererContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,9 @@ public List<RenderedObject> retrievePolygonsAroundPoint(PointI point, ZoomLevel
for (int i = 0; i < polygons.size(); i++) {
MapObject polygon = polygons.get(i);
RenderedObject renderedObject = createRenderedObjectForPolygon(polygon, i);
res.add(renderedObject);
if (renderedObject != null) {
res.add(renderedObject);
}
}
}
return res;
Expand All @@ -726,6 +728,9 @@ private RenderedObject createRenderedObjectForPolygon(MapObject mapObject, int o
for (int i = 0; i < tagsKeys.size(); i++) {
String key = tagsKeys.get(i);
String value = tags.get(key);
if ("osmand_change".equals(key) && "delete".equals(value)) {
return null;
}
object.putTag(key, value);
}

Expand All @@ -734,6 +739,9 @@ private RenderedObject createRenderedObjectForPolygon(MapObject mapObject, int o
for (int i = 0; i < namesKeys.size(); i++) {
String key = namesKeys.get(i);
String value = names.get(key);
if ("osmand_change".equals(key) && "delete".equals(value)) {
return null;
}
object.setName(key, value);
}

Expand Down

0 comments on commit 0cfd0d2

Please sign in to comment.