findDataSourceTypeByName()

Information

Implementation version: beta 1.02

Description

It finds and defines one of the map's dataSources from its name and type. If it cannot find any, it returns an undefined and a warning message.

Invocation

findDataSourceTypeByName(
	dataSourceName,
	dataSourceType
)

Input parameters

dataSourceName

The name of the dataSource that is being searched. This parameter is entered as a text string.

dataSourceType

The type of dataSource that is being searched. This parameter is also included as a text string, and it accepts the following possibilities:

  1. entity: for entity dataSources.
  2. primitive: for primitive dataSources.
  3. raster: for image dataSources.


Cesium only considers the entity groupings as dataSources. However, to maintain a logic when working with the different elements, it has been decided to call dataSources also to the groupings of primitives and image layers. Thus, the work mode applicable to the entities can be extrapolated to the rest of the map elements.

Use examples

Find the dataSource with name 'dataSourceMinsaitLogo' and type 'raster':

findDataSourceTypeByName(
	'dataSourceMinsaitLogo',
	'raster'
)