@panoramax/web-viewer
Version:
Panoramax web viewer for geolocated pictures
36 lines (24 loc) • 1.61 kB
Markdown
<a name="Panoramax.utils.PresetsManager"></a>
## Panoramax.utils.PresetsManager
**Kind**: static class of <code>Panoramax.utils</code>
* [.PresetsManager](#Panoramax.utils.PresetsManager)
* [new PresetsManager([lang], [skipLoad])](#new_Panoramax.utils.PresetsManager_new)
* [.onceReady()](#Panoramax.utils.PresetsManager+onceReady) ⇒ <code>Promise</code>
* [.getPreset()](#Panoramax.utils.PresetsManager+getPreset) ⇒ <code>Promise</code>
<a name="new_Panoramax.utils.PresetsManager_new"></a>
### new PresetsManager([lang], [skipLoad])
Presets Manager handle retrieval of presets against dedicated endpoint.
It allows an easily search between all presets, and handles translations.
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [lang] | <code>string</code> | | The user prefered language. Defaults to web browser preferences. |
| [skipLoad] | <code>boolean</code> | <code>false</code> | Set to true to disable automatic load of API data |
<a name="Panoramax.utils.PresetsManager+onceReady"></a>
### presetsManager.onceReady() ⇒ <code>Promise</code>
Resolves when the all necessary data was downloaded.
**Kind**: instance method of [<code>PresetsManager</code>](#Panoramax.utils.PresetsManager)
<a name="Panoramax.utils.PresetsManager+getPreset"></a>
### presetsManager.getPreset() ⇒ <code>Promise</code>
Find the best matching preset for a given STAC feature.
**Kind**: instance method of [<code>PresetsManager</code>](#Panoramax.utils.PresetsManager)
**Fulfil**: <code>object\|null</code> The preset JSON that best matches, or null if no matches