File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ export default {
75
75
}
76
76
77
77
results . push ( {
78
- name : this . _deocodeFeatureName ( f ) ,
78
+ name : this . _decodeFeatureName ( f ) ,
79
79
html : this . options . htmlTemplate ? this . options . htmlTemplate ( f ) : undefined ,
80
80
center : latLng ,
81
81
bbox : bbox ,
@@ -87,13 +87,15 @@ export default {
87
87
return results ;
88
88
} ,
89
89
90
- _deocodeFeatureName : function ( f ) {
91
- var j , name ;
92
- for ( j = 0 ; ! name && j < this . options . nameProperties . length ; j ++ ) {
93
- name = f . properties [ this . options . nameProperties [ j ] ] ;
94
- }
95
-
96
- return name ;
90
+ _decodeFeatureName : function ( f ) {
91
+ return ( this . options . nameProperties || [ ] )
92
+ . map ( function ( p ) {
93
+ return f . properties [ p ] ;
94
+ } )
95
+ . filter ( function ( v ) {
96
+ return ! ! v ;
97
+ } )
98
+ . join ( ', ' ) ;
97
99
}
98
100
} ) ,
99
101
You can’t perform that action at this time.
0 commit comments