File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ export function osmSetAreaKeys(value) {
6969// `highway` and `railway` are typically linear features, but there
7070// are a few exceptions that should be treated as areas, even in the
7171// absence of a proper `area=yes` or `areaKeys` tag.. see #4194
72+ // similarly, some tags are both used as a primary key for area features,
73+ // but also as an attribute tag for linear features (e.g. `emergency=yes`)
7274export var osmAreaKeysExceptions = {
7375 highway : {
7476 elevator : true ,
@@ -92,6 +94,14 @@ export var osmAreaKeysExceptions = {
9294 } ,
9395 amenity : {
9496 bicycle_parking : true
97+ } ,
98+ emergency : {
99+ yes : false ,
100+ no : false ,
101+ private : false ,
102+ designated : false ,
103+ destination : false ,
104+ official : false
95105 }
96106} ;
97107
@@ -103,6 +113,9 @@ export function osmTagSuggestingArea(tags) {
103113 var returnTags = { } ;
104114 for ( var realKey in tags ) {
105115 const key = osmRemoveLifecyclePrefix ( realKey ) ;
116+ if ( key in osmAreaKeysExceptions && osmAreaKeysExceptions [ key ] [ tags [ realKey ] ] === false ) {
117+ continue ;
118+ }
106119 if ( key in osmAreaKeys && ! ( tags [ realKey ] in osmAreaKeys [ key ] ) ) {
107120 returnTags [ realKey ] = tags [ realKey ] ;
108121 return returnTags ;
You can’t perform that action at this time.
0 commit comments