forked from MapComplete/MapComplete
chore: automated housekeeping...
This commit is contained in:
parent
9cd7ad597d
commit
69ab755f29
520 changed files with 16616 additions and 13483 deletions
|
|
@ -361,14 +361,13 @@ export default class ShowDataLayer {
|
|||
layers: LayerConfig[],
|
||||
options?: Partial<Omit<ShowDataLayerOptions, "features" | "layer">>
|
||||
) {
|
||||
const perLayer =
|
||||
new PerLayerFeatureSourceSplitter(
|
||||
layers.filter((l) => l.source !== null).map((l) => new FilteredLayer(l)),
|
||||
features,
|
||||
{
|
||||
constructStore: (features, layer) => new SimpleFeatureSource(layer, features),
|
||||
}
|
||||
)
|
||||
const perLayer = new PerLayerFeatureSourceSplitter(
|
||||
layers.filter((l) => l.source !== null).map((l) => new FilteredLayer(l)),
|
||||
features,
|
||||
{
|
||||
constructStore: (features, layer) => new SimpleFeatureSource(layer, features),
|
||||
}
|
||||
)
|
||||
if (options?.zoomToFeatures) {
|
||||
options.zoomToFeatures = false
|
||||
features.features.addCallbackD((features) => {
|
||||
|
|
@ -397,17 +396,21 @@ export default class ShowDataLayer {
|
|||
* @param state
|
||||
* @param options
|
||||
*/
|
||||
public static showLayerClustered(mlmap: Store<MlMap>,
|
||||
state: { mapProperties: { zoom: UIEventSource<number> } },
|
||||
options: ShowDataLayerOptions & { layer: LayerConfig }
|
||||
public static showLayerClustered(
|
||||
mlmap: Store<MlMap>,
|
||||
state: { mapProperties: { zoom: UIEventSource<number> } },
|
||||
options: ShowDataLayerOptions & { layer: LayerConfig }
|
||||
) {
|
||||
options.preprocessPoints = feats =>
|
||||
new ClusteringFeatureSource(feats, state.mapProperties.zoom.map(z => z + 2),
|
||||
options.preprocessPoints = (feats) =>
|
||||
new ClusteringFeatureSource(
|
||||
feats,
|
||||
state.mapProperties.zoom.map((z) => z + 2),
|
||||
options.layer.id,
|
||||
{
|
||||
cutoff: 7,
|
||||
showSummaryAt: "tilecenter"
|
||||
})
|
||||
showSummaryAt: "tilecenter",
|
||||
}
|
||||
)
|
||||
new ShowDataLayer(mlmap, options)
|
||||
}
|
||||
|
||||
|
|
@ -453,7 +456,7 @@ export default class ShowDataLayer {
|
|||
layer,
|
||||
drawLines,
|
||||
drawMarkers,
|
||||
preprocessPoints
|
||||
preprocessPoints,
|
||||
} = this._options
|
||||
let onClick = this._options.onClick
|
||||
if (!onClick && selectedElement && layer.title !== undefined) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue