Skip to main content
Version: Next

getVectorDatasourceById()

function getVectorDatasourceById(datasourceId, datasources): object

find and return vector datasource (internal or external) from passed datasources

Parameters

ParameterType
datasourceIdstring
datasources(object | object | object & object | object & object)[]

Returns

object

bboxFilter?

optional bboxFilter: [number, number, number, number] | [number, number, number, number, number, number];

Optional, constrain datasource to smaller bbox

classKeys

classKeys: string[];

keys to generate classes for. Vector - property names

datasourceId

datasourceId: string;

Unique id of datasource in project

formats

formats: ("fgb" | "json" | "tif" | "subdivided")[];

Available formats

geo_type

geo_type: "vector" | "raster" = geoTypesSchema;

basic geospatial type

idProperty?

optional idProperty: string;

Optional, name of property containing unique ID value for each vector feature

layerName?

optional layerName: string;

Import - Name of layer within vector datasource to extract

metadata?

optional metadata: object;

metadata.description?

optional description: string;

Description of datasource

metadata.name

name: string;

Human-readable name of datasource

metadata.publishDate

publishDate: string;

ISO 8601 publish date

metadata.publisher

publisher: string;

Publisher name

publishLink: string;

Public URL to access published data

metadata.version

version: string;

Publisher-provided version number or ISO 8601 date

nameProperty?

optional nameProperty: string;

Optional, name of property containing name for each vector feature

precalc

precalc: boolean;

Optional, defines whether or not precalc should be run for this datasource

propertyFilter?

optional propertyFilter: object;

Optional, constrain datasource features by property having one or more specific values

propertyFilter.property

property: string;

propertyFilter.values

values: (string | number)[];