IGeoService
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Service allowing access to geo location assets (styles, tiles, glyphs) and management of custom geo collections.
export interface IGeoService
Methods
Method | Description |
|---|---|
(ALPHA) Returns service for managing custom geo collections. | |
(ALPHA) Loads a single asset referenced by a style document (vector tile, glyph range, sprite sheet) with the credentials of the current session. | |
(ALPHA) Loads the default MapLibre style configured for the authenticated organization. | |
(ALPHA) Loads icon names from the sprite sheet used by the default geo style. | |
(ALPHA) Loads the MapLibre style for a specific style identifier. | |
(ALPHA) Lists all available map styles. |
Method details
IGeoService.collections()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Returns service for managing custom geo collections.
collections(): IOrganizationGeoCollectionsService;
Returns
IGeoService.getAsset()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Loads a single asset referenced by a style document (vector tile, glyph range, sprite sheet) with the credentials of the current session.
getAsset(url: string, options?: IGeoAssetOptions): Promise<IGeoAsset>;
Parameters
Parameter | Type | Description |
|---|---|---|
url | string | URL of the asset, as it appears in the style document |
options | (Optional) response type and abort signal |
Returns
Promise<IGeoAsset>
Remarks
Only the path of the URL is loaded, from the backend this service is bound to; the origin found in the URL is never contacted. Rejects a URL for which isGeoAssetUrl() does not hold.
IGeoService.getDefaultStyle()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Loads the default MapLibre style configured for the authenticated organization.
getDefaultStyle(params?: IGeoStyleParams): Promise<IGeoStyleSpecification>;
Parameters
Parameter | Type | Description |
|---|---|---|
params | (Optional) Optional query parameters. |
Returns
Promise<IGeoStyleSpecification>
IGeoService.getDefaultStyleSpriteIcons()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Loads icon names from the sprite sheet used by the default geo style.
getDefaultStyleSpriteIcons(): Promise<string[]>;
Returns
Promise<string[]>
Remarks
Returns an empty array when the organization does not have a sprite sheet configured.
IGeoService.getStyleById()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Loads the MapLibre style for a specific style identifier.
getStyleById(styleId: string, params?: IGeoStyleParams): Promise<IGeoStyleSpecification>;
Parameters
Parameter | Type | Description |
|---|---|---|
styleId | string | Style identifier (e.g. |
params | (Optional) Optional query parameters. |
Returns
Promise<IGeoStyleSpecification>
IGeoService.getStyles()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Lists all available map styles.
getStyles(): Promise<IGeoStyleListItem[]>;
Returns
Promise<IGeoStyleListItem[]>