Title
Page icon
Create new category
Edit page index title
Edit category
Edit link
Manage camera
Following events allows you to manage 3D map zoom.
zoomIn
Zoom in the camera with a step passed in parameter.
Parameters
Name | type | description |
|---|---|---|
zoomValue | number | step to increment current zoom |
Result
No result
Example
zoomOut
Zoom out the camera with a step passed in parameter
Parameters
Name | type | description |
|---|---|---|
zoomValue | number | step to decrement current zoom |
Result
No result
Example
zoomReset
Reset current zoom to initial value
Parameters
No parameter
Result
No result
Example
getZoom
Get current zoom value
Parameters
No parameter
Result
No result
Name | type | description |
|---|---|---|
zoomValue | number | the current camera zoom |
Example
setZoom
Allow you to define a zoom for the camera
Parameters
Name | type | description |
|---|---|---|
zoomValue | number | the camera zoom to set (value between 0 and 1, 0 is the maximum zoom) |
Result
No result
Example
zoomOnContainer
Move camera to a container and zoom on it
Parameters
Name | type | description |
|---|---|---|
containerId | number | Container id to zoom on |
Result
No result
Example
setCameraView
Change camera mode
Parameters
Name | type | description |
|---|---|---|
cameraView | string | View type to use, see above for all values availables |
View types are:
2d: 2D (Orthographic)
fps: First Person
3d: default (Perspective camera)
3dItinerary: Itinerary mode (follow the Player object in the scene)
2dItinerary: 2D itinerary mode (follow the Player object in the scene)
Result
No result
Example
blockZoom
Block camera zoom
Parameters
Name | type | description |
|---|---|---|
state | boolean | true for block zoom |
Result
No result
Example
blockCameraRotation
Block camera rotation
Parameters
Name | type | description |
|---|---|---|
state | boolean | true for block rotation |
Result
No result
Example
forceFixedCameraRotation
Block camera rotation to specific angle
Parameters
Name | type | description |
|---|---|---|
angle | number | View type to use, see above for all values availables |
Result
No result
followUser
Allow you to move the camera in order to follow the blue dot of the event setUserPosition. Just call it once, if you move on the map with the cursor or the finger, the tracking of the user by the camera is disabled and the value will be set à false.
Parameters
Name | type | description |
|---|---|---|
follow | boolean | Allow "true" or disallow "false" the tracking of the user by the camera |
