Merge branch 'develop' into feature/move-flox

This commit is contained in:
Pieter Vander Vennet 2021-10-13 01:29:29 +02:00
commit 11d5ccf93f
35 changed files with 773 additions and 243 deletions

View file

@ -50,13 +50,11 @@ export default class ThemeIntroductionPanel extends Combine {
)
super([
layout.description.Clone(),
"<br/><br/>",
layout.description.Clone().SetClass("blcok mb-4"),
toTheMap,
loginStatus,
layout.descriptionTail?.Clone(),
"<br/>",
languagePicker,
loginStatus.SetClass("block"),
layout.descriptionTail?.Clone().SetClass("block mt-4"),
languagePicker?.SetClass("block mt-4"),
...layout.CustomCodeSnippets()
])

View file

@ -22,7 +22,7 @@ export class TileHierarchyAggregator implements FeatureSource {
public readonly name;
private readonly featuresStatic = []
private readonly featureProperties: { count: string, tileId: string, id: string };
private readonly featureProperties: { count: string, kilocount: string, tileId: string, id: string };
private constructor(parent: TileHierarchyAggregator, z: number, x: number, y: number) {
this._parent = parent;
@ -36,7 +36,8 @@ export class TileHierarchyAggregator implements FeatureSource {
const totals = {
id: ""+this._tileIndex,
tileId: ""+this._tileIndex,
count: ""+0
count: `0`,
kilocount: "0"
}
this.featureProperties = totals
@ -108,6 +109,7 @@ export class TileHierarchyAggregator implements FeatureSource {
this.features.setData(TileHierarchyAggregator.empty)
} else {
this.featureProperties.count = "" + total;
this.featureProperties.kilocount = "" +Math.floor(total/1000);
this.features.data = this.featuresStatic
this.features.ping()
}
@ -153,13 +155,18 @@ export class TileHierarchyAggregator implements FeatureSource {
}
}
getCountsForZoom(locationControl: UIEventSource<{ zoom : number }>, cutoff: number = 0) : FeatureSource{
getCountsForZoom(clusteringConfig: {maxZoom: number}, locationControl: UIEventSource<{ zoom : number }>, cutoff: number = 0) : FeatureSource{
const self = this
const empty = []
return new StaticFeatureSource(
locationControl.map(loc => {
const features = []
const targetZoom = loc.zoom
if(targetZoom > clusteringConfig.maxZoom){
return empty
}
const features = []
self.visitSubTiles(aggr => {
if(aggr.totalValue < cutoff) {
return false

View file

@ -55,7 +55,11 @@ export default class SpecialVisualizations {
if (!tags.hasOwnProperty(key)) {
continue
}
parts.push([key, tags[key] ?? "<b>undefined</b>"]);
let v = tags[key]
if(v === ""){
v = "<b>empty string</b>"
}
parts.push([key, v ?? "<b>undefined</b>"]);
}
for(const key of calculatedTags){