|
@@ -218,6 +218,7 @@ function AddBuilding(props) {
|
218
|
218
|
* @param {*} tags
|
219
|
219
|
*/
|
220
|
220
|
function tagFilter(tags, keyType) {
|
|
221
|
+ debugger
|
221
|
222
|
console.log(tags)
|
222
|
223
|
if (!tags) {
|
223
|
224
|
return null
|
|
@@ -230,15 +231,17 @@ function AddBuilding(props) {
|
230
|
231
|
const determineTag = poi.map(p => {
|
231
|
232
|
if (p.key === keyType) {
|
232
|
233
|
if (typeof p.data === 'string') {
|
233
|
|
- p.data = JSON.parse(p.data).filter(f => automaticTag.includes(f.name)) || []
|
|
234
|
+ p.data = JSON.parse(p.data).filter(f => automaticTag.includes(f.name))
|
234
|
235
|
} else {
|
235
|
|
- p.data = p.data.filter(x => tags.some(t => !t.automatic || t.tagName === x.name))
|
|
236
|
+ p.data = p.data.filter(f => automaticTag.includes(f.name))
|
236
|
237
|
}
|
237
|
238
|
}
|
238
|
239
|
return p
|
239
|
240
|
})
|
240
|
241
|
|
241
|
242
|
setPoi(determineTag)
|
|
243
|
+
|
|
244
|
+ debugger
|
242
|
245
|
return tags.filter(f => f.automatic === false).map(x => x.tagName).join(',')
|
243
|
246
|
}
|
244
|
247
|
|