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:
- fly:Â implies a smooth movement from the camera's current position to its final position.
- 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:
- dataSource: the element to move to is a dataSource.
- entity: the element is an entity, regardless of whether it is inside or outside a dataSource.
- primitive: the element is a primitive.
- 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' )