跳到主要内容

flywave-mapview.themeloader

Home > @flywave/flywave-mapview > ThemeLoader

ThemeLoader class

Loads and validates a theme from URL objects.

Signature:

export declare class ThemeLoader 

Methods

Method

Modifiers

Description

isThemeLoaded(theme)

static

Checks if theme instance is completely loaded, meaning that extends property is resolved.

load(theme, options)

static

Loads a from a remote resource, provided as a URL that points to a JSON-encoded theme.

By default, resolves following features of theme:

  • extends - loads and merges all inherited themes (see [[resolveBaseTheme]]) - ref - resolves all ref instances to their values defined in definitions section of theme (see [[resolveThemeReferences]])

Relative URIs of reference resources are resolved to full URL using the document's base URL (see [[resolveUrls]]).

Custom URIs (of theme itself and of resources referenced by theme) may be resolved with by providing using // ThemeLoadOptions.uriResolver option.

loadAsync(themeUrl)

static