mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-19 23:14:47 +02:00
fix some boundaries not hidden by the filter, closes #9171
This commit is contained in:
@@ -69,6 +69,11 @@ export function rendererFeatures(context) {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} k
|
||||
* @param {(tags: Record<string, string>, geometry: string) => boolean} filter
|
||||
* @param {?number} max
|
||||
*/
|
||||
function defineRule(k, filter, max) {
|
||||
var isEnabled = true;
|
||||
|
||||
@@ -133,9 +138,13 @@ export function rendererFeatures(context) {
|
||||
!_rules.pistes.filter(tags);
|
||||
});
|
||||
|
||||
defineRule('boundaries', function isBoundary(tags) {
|
||||
defineRule('boundaries', function isBoundary(tags, geometry) {
|
||||
// This rule applies if the object has no interesting tags, and if either:
|
||||
// (a) is a way having a `boundary=*` tag, or
|
||||
// (b) is a relation of `type=boundary`.
|
||||
return (
|
||||
!!tags.boundary
|
||||
(geometry === 'line' && !!tags.boundary) ||
|
||||
(geometry === 'relation' && tags.type === 'boundary')
|
||||
) && !(
|
||||
traffic_roads[tags.highway] ||
|
||||
service_roads[tags.highway] ||
|
||||
|
||||
Reference in New Issue
Block a user