Fix contributor count

This commit is contained in:
Pieter Vander Vennet 2023-04-14 00:12:15 +02:00
parent 43601987dc
commit 466dd16568
2 changed files with 21 additions and 3 deletions

View file

@ -225,10 +225,17 @@ export class BBox {
]
}
public asGeoJson<T>(properties: T): Feature<Polygon, T> {
public asGeojsonCached() {
if (this["geojsonCache"] === undefined) {
this["geojsonCache"] = this.asGeoJson({})
}
return this["geojsonCache"]
}
public asGeoJson<T = {}>(properties?: T): Feature<Polygon, T> {
return {
type: "Feature",
properties,
properties: properties,
geometry: this.asGeometry(),
}
}