cameraToElement()

Información

Implementation version: beta 1.00

Updated in: beta 1.06

Description

Moves the map viewer's camera to a specific map element defined by its name.

Invocation

cameraToElement(
	zoomType,
	elementType,
	elementName
)

Input parameters

zoomType

The type of zoom that the viewer's camera will perform. The parameter to enter is type text, and accepts one of these two options:

  1. fly: implies a smooth movement from the camera's current position to its final position.
  2. zoom: instant scrolling to the camera's final position.

elementType

The type of map item that is zoomed. The parameter to enter is type text, and accepts one of these four options:

  1. dataSource: the element to move to is a dataSource.
  2. entity: the element is an entity, regardless of whether it is inside or outside a dataSource.
  3. primitive: the element is a primitive.
  4. raster: not supported yet.

elementName

The value of the 'name' or 'id' field of the element to which the viewer's camera is to be moved. The parameter to enter is type text.

Use examples

Move the camera smoothly from the current position to a dataSource of entities named 'dataSourceExample':

cameraToElement(
	'fly',
	'dataSource',
	'dataSourceExample'
)