Add a nature reserve oriented quest layout

This commit is contained in:
Pieter Vander Vennet 2020-07-18 20:40:51 +02:00
parent a7d356c263
commit fe4fa9dd0e
24 changed files with 591 additions and 1307 deletions

View file

@ -62,9 +62,9 @@ export class LayerDefinition {
* icon is the Leaflet icon
* Note that this is passed entirely to leaflet, so other leaflet attributes work too
*/
style: (tags: any) => {
color: string,
icon: any ,
style: (tags: any) => {
color: string,
icon: any,
};
/**
@ -73,6 +73,36 @@ export class LayerDefinition {
maxAllowedOverlapPercentage: number = undefined;
constructor(options: {
name: string,
newElementTags: Tag[],
icon: string,
minzoom: number,
overpassFilter: TagsFilter,
title?: TagRenderingOptions,
elementsToShow?: TagDependantUIElementConstructor[],
maxAllowedOverlapPercentage?: number,
style?: (tags: any) => {
color: string,
icon: any
}
} = undefined) {
if (options === undefined) {
console.log("No options!")
return;
}
this.name = options.name;
this.maxAllowedOverlapPercentage = options.maxAllowedOverlapPercentage ?? 0;
this.newElementTags = options.newElementTags;
this.icon = options.icon;
this.minzoom = options.minzoom;
this.overpassFilter = options.overpassFilter;
this.title = options.title;
this.elementsToShow = options.elementsToShow;
this.style = options.style;
console.log(this)
}
asLayer(basemap: Basemap, allElements: ElementStorage, changes: Changes, userDetails: UIEventSource<UserDetails>, selectedElement: UIEventSource<any>,
showOnPopup: (tags: UIEventSource<(any)>) => UIElement):
FilteredLayer {