forked from MapComplete/MapComplete
Optimizing trees theme and clustering
This commit is contained in:
parent
5ac035be20
commit
8fca373437
11 changed files with 125 additions and 67 deletions
|
@ -38,7 +38,8 @@ export default class ShowDataLayer {
|
|||
ShowDataLayer.dataLayerIds++
|
||||
this._enablePopups = options.enablePopups ?? true;
|
||||
if (options.features === undefined) {
|
||||
throw "Invalid ShowDataLayer invocation"
|
||||
console.error("Invalid ShowDataLayer invocation: options.features is undefed")
|
||||
throw "Invalid ShowDataLayer invocation: options.features is undefed"
|
||||
}
|
||||
const features = options.features.features.map(featFreshes => featFreshes.map(ff => ff.feature));
|
||||
this._features = features;
|
||||
|
@ -166,7 +167,7 @@ export default class ShowDataLayer {
|
|||
|
||||
|
||||
private createStyleFor(feature) {
|
||||
const tagsSource = this.allElements?.addOrGetElement(feature) ?? new UIEventSource<any>(feature.properties.id);
|
||||
const tagsSource = this.allElements?.addOrGetElement(feature) ?? new UIEventSource<any>(feature.properties);
|
||||
// Every object is tied to exactly one layer
|
||||
const layer = this._layerToShow
|
||||
return layer?.GenerateLeafletStyle(tagsSource, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue