forked from MapComplete/MapComplete
Various bugfixes and improvements to UK_addresses and GRB theme
This commit is contained in:
parent
bec7ed6da6
commit
8acf85cc55
16 changed files with 290 additions and 82 deletions
|
@ -18,6 +18,8 @@ export default class MetaTagging {
|
|||
/**
|
||||
* This method (re)calculates all metatags and calculated tags on every given object.
|
||||
* The given features should be part of the given layer
|
||||
*
|
||||
* Returns true if at least one feature has changed properties
|
||||
*/
|
||||
public static addMetatags(features: { feature: any; freshness: Date }[],
|
||||
params: ExtraFuncParams,
|
||||
|
@ -25,7 +27,7 @@ export default class MetaTagging {
|
|||
options?: {
|
||||
includeDates?: true | boolean,
|
||||
includeNonDates?: true | boolean
|
||||
}) {
|
||||
}): boolean {
|
||||
|
||||
if (features === undefined || features.length === 0) {
|
||||
return;
|
||||
|
@ -48,6 +50,7 @@ export default class MetaTagging {
|
|||
// The calculated functions - per layer - which add the new keys
|
||||
const layerFuncs = this.createRetaggingFunc(layer)
|
||||
|
||||
let atLeastOneFeatureChanged = false;
|
||||
|
||||
for (let i = 0; i < features.length; i++) {
|
||||
const ff = features[i];
|
||||
|
@ -95,8 +98,10 @@ export default class MetaTagging {
|
|||
|
||||
if (somethingChanged) {
|
||||
State.state?.allElements?.getEventSourceById(feature.properties.id)?.ping()
|
||||
atLeastOneFeatureChanged = true
|
||||
}
|
||||
}
|
||||
return atLeastOneFeatureChanged
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue