Manage camera

Following events allows you to manage 3D map zoom.

zoomIn

Zoom in the camera with a step passed in parameter.

Parameters

Nametypedescription
zoomValuenumberstep to increment current zoom

Result

No result

Example

Javascript
Swift
Java
Copy

zoomOut

Zoom out the camera with a step passed in parameter

Parameters

Nametypedescription
zoomValuenumberstep to decrement current zoom

Result

No result

Example

Javascript
Swift
Java
Copy

zoomReset

Reset current zoom to initial value

Parameters

No parameter

Result

No result

Example

Javascript
Swift
Java
Copy

getZoom

Get current zoom value

Parameters

No parameter

Result

No result

Nametypedescription
zoomValuenumberthe current camera zoom

Example

Javascript
Swift
Java
Copy

setZoom

Allow you to define a zoom for the camera

Parameters

Nametypedescription
zoomValuenumberthe camera zoom to set (value between 0 and 1, 0 is the maximum zoom)

Result

No result

Example

Javascript
Swift
Java
Copy

zoomOnContainer

Move camera to a container and zoom on it

Parameters

Nametypedescription
containerIdnumberContainer id to zoom on

Result

No result

Example

Javascript
Swift
Java
Copy

setCameraView

Change camera mode

Parameters

Nametypedescription
cameraViewstringView 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

Javascript
Swift
Java
Copy

blockZoom

Block camera zoom

Parameters

Nametypedescription
statebooleantrue for block zoom

Result

No result

Example

Javascript
Swift
Java
Copy

blockCameraRotation

Block camera rotation

Parameters

Nametypedescription
statebooleantrue for block rotation

Result

No result

Example

Javascript
Swift
Java
Copy

forceFixedCameraRotation

Block camera rotation to specific angle

Parameters

Nametypedescription
anglenumberView type to use, see above for all values availables

Result

No result

Javascript
Swift
Java
Copy

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

Nametypedescription
followbooleanAllow "true" or disallow "false" the tracking of the user by the camera
Javascript
Swift
Java
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard