forked from MapComplete/MapComplete
Add feature to the featureInfoBox so that geometry is available there as well
This commit is contained in:
parent
1373bd106e
commit
8268c0d054
7 changed files with 39 additions and 18 deletions
|
@ -90,7 +90,7 @@ export class LayerDefinition {
|
|||
title?: TagRenderingOptions,
|
||||
elementsToShow?: TagDependantUIElementConstructor[],
|
||||
maxAllowedOverlapPercentage?: number,
|
||||
waysToCenterPoints?: boolean,
|
||||
wayHandling?: number,
|
||||
style?: (tags: any) => {
|
||||
color: string,
|
||||
icon: any
|
||||
|
@ -108,11 +108,12 @@ export class LayerDefinition {
|
|||
this.title = options.title;
|
||||
this.elementsToShow = options.elementsToShow;
|
||||
this.style = options.style;
|
||||
this.wayHandling = options.waysToCenterPoints ?? LayerDefinition.WAYHANDLING_DEFAULT;
|
||||
this.wayHandling = options.wayHandling ?? LayerDefinition.WAYHANDLING_DEFAULT;
|
||||
}
|
||||
|
||||
asLayer(basemap: Basemap, allElements: ElementStorage, changes: Changes, userDetails: UIEventSource<UserDetails>, selectedElement: UIEventSource<any>,
|
||||
showOnPopup: (tags: UIEventSource<(any)>) => UIElement):
|
||||
asLayer(basemap: Basemap, allElements: ElementStorage, changes: Changes, userDetails: UIEventSource<UserDetails>,
|
||||
selectedElement: UIEventSource<{feature: any}>,
|
||||
showOnPopup: (tags: UIEventSource<(any)>, feature: any) => UIElement):
|
||||
FilteredLayer {
|
||||
return new FilteredLayer(
|
||||
this.name,
|
||||
|
|
|
@ -25,6 +25,13 @@ export class NatureReserves extends LayerDefinition {
|
|||
this.style = this.generateStyleFunction();
|
||||
this.elementsToShow = [
|
||||
new ImageCarouselWithUploadConstructor(),
|
||||
new TagRenderingOptions({
|
||||
freeform: {
|
||||
key: "_surface",
|
||||
renderTemplate: "{_surface}m²",
|
||||
template: "$$$"
|
||||
}
|
||||
}),
|
||||
new NameQuestion(),
|
||||
new AccessTag(),
|
||||
new OperatorTag(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue