forked from MapComplete/MapComplete
Feature: add more vector layers from maptiler; add some fixes to theme setting handler
This commit is contained in:
parent
94f9fe7b5f
commit
b3edbe846c
18 changed files with 155 additions and 99 deletions
|
@ -43,6 +43,7 @@ export default class UserRelatedState {
|
|||
public readonly homeLocation: FeatureSource
|
||||
public readonly language: UIEventSource<string>
|
||||
public readonly preferredBackgroundLayer: UIEventSource<string | "photo" | "map" | "osmbasedmap" | undefined>
|
||||
public readonly preferredBackgroundLayerForTheme: UIEventSource<string | "photo" | "map" | "osmbasedmap" | undefined>
|
||||
/**
|
||||
* The number of seconds that the GPS-locations are stored in memory.
|
||||
* Time in seconds
|
||||
|
@ -258,6 +259,7 @@ export default class UserRelatedState {
|
|||
): UIEventSource<Record<string, string>> {
|
||||
const amendedPrefs = new UIEventSource<Record<string, string>>({
|
||||
_theme: layout?.id,
|
||||
"_theme:backgroundLayer": layout?.defaultBackgroundId,
|
||||
_backend: this.osmConnection.Backend(),
|
||||
_applicationOpened: new Date().toISOString(),
|
||||
_supports_sharing:
|
||||
|
|
|
@ -9,6 +9,6 @@ export class ThemeMetaTagging {
|
|||
Utils.AddLazyProperty(feat.properties, '_mastodon_candidate_a', () => (feat => {const e = document.createElement('div');e.innerHTML = feat.properties._d;return Array.from(e.getElementsByTagName("a")).filter(a => a.href.match(/mastodon|en.osm.town/) !== null)[0]?.href }) (feat) )
|
||||
Utils.AddLazyProperty(feat.properties, '_mastodon_link', () => (feat => {const e = document.createElement('div');e.innerHTML = feat.properties._d;return Array.from(e.getElementsByTagName("a")).filter(a => a.getAttribute("rel")?.indexOf('me') >= 0)[0]?.href})(feat) )
|
||||
Utils.AddLazyProperty(feat.properties, '_mastodon_candidate', () => feat.properties._mastodon_candidate_md ?? feat.properties._mastodon_candidate_a )
|
||||
Utils.AddLazyProperty(feat.properties, '__backgroundLayerId', () => 'some value to let the validation run through' )
|
||||
Utils.AddLazyProperty(feat.properties, '__current_background', () => 'initial_value' )
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue