findDataSourceByLayerName()

Information

Implementation version: beta 1.03

Description

It finds and defines one of the dataSources of the map from the name of the layer. If none can be found, it returns an undefined and a warning message. If it finds more than one dataSource with the same name, it specifies the number of repetitions, returning the first one found according to the hierarchy: entities > primitives > images.

Invocation

findDataSourceByLayerName(
	layerName
)

Input parameters

layerName

The name of the layer from which the dataSource will be selected. This name corresponds to the name of the entity collection (featureCollection.name). It is entered as a text string.

Use examples

Search and select the dataSource corresponding to the 'points single' layer:

findDataSourceByLayerName(
	'points single'
)