forked from MapComplete/MapComplete
		
	Add themes to search functionality, including quickswitch between recent themes
This commit is contained in:
		
							parent
							
								
									b4866cdbac
								
							
						
					
					
						commit
						329865a15e
					
				
					 22 changed files with 679 additions and 431 deletions
				
			
		| 
						 | 
				
			
			@ -12,7 +12,21 @@ import { RasterLayerProperties } from "../RasterLayerProperties"
 | 
			
		|||
 | 
			
		||||
import { ConversionContext } from "./Conversion/ConversionContext"
 | 
			
		||||
import { Translatable } from "./Json/Translatable"
 | 
			
		||||
import { MinimalTagRenderingConfigJson, TagRenderingConfigJson } from "./Json/TagRenderingConfigJson"
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Minimal information about a theme
 | 
			
		||||
 **/
 | 
			
		||||
export class MinimalLayoutInformation {
 | 
			
		||||
    id: string
 | 
			
		||||
    icon: string
 | 
			
		||||
    title: Translatable
 | 
			
		||||
    shortDescription: Translatable
 | 
			
		||||
    definition?: Translatable
 | 
			
		||||
    mustHaveLanguage?: boolean
 | 
			
		||||
    hideFromOverview?: boolean
 | 
			
		||||
    keywords?: (Translatable | TagRenderingConfigJson)[]
 | 
			
		||||
}
 | 
			
		||||
/**
 | 
			
		||||
 * Minimal information about a theme
 | 
			
		||||
 **/
 | 
			
		||||
| 
						 | 
				
			
			@ -27,6 +41,8 @@ export class LayoutInformation {
 | 
			
		|||
    keywords?: (Translatable | Translation)[]
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
export default class LayoutConfig implements LayoutInformation {
 | 
			
		||||
    public static readonly defaultSocialImage = "assets/SocialImage.png"
 | 
			
		||||
    public readonly id: string
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -81,6 +81,7 @@ import CoordinateSearch from "../Logic/Geocoding/CoordinateSearch"
 | 
			
		|||
import LocalElementSearch from "../Logic/Geocoding/LocalElementSearch"
 | 
			
		||||
import { RecentSearch } from "../Logic/Geocoding/RecentSearch"
 | 
			
		||||
import PhotonSearch from "../Logic/Geocoding/PhotonSearch"
 | 
			
		||||
import ThemeSearch from "../Logic/Geocoding/ThemeSearch"
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
| 
						 | 
				
			
			@ -393,6 +394,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
 | 
			
		|||
            new LocalElementSearch(this, 5),
 | 
			
		||||
            new PhotonSearch(), // new NominatimGeocoding(),
 | 
			
		||||
            new CoordinateSearch(),
 | 
			
		||||
            this.featureSwitches.featureSwitchBackToThemeOverview.data ? new ThemeSearch(this) : undefined
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        this.recentlySearched = new RecentSearch(this)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue