Maps API for JavaScript Developer's Guide

H.map.IControl

Interface Summary

Control interface defines method which are used for direct view or camera manipulation

[ For full details, see the Interface Details ]

Method Summary

Table 1. Methods
Methods

startControl (opt_kinetics, opt_atX, opt_atY)

This method starts control action for camera. This action allows to control camera animation and movement according to provided values in the H.map.IControl#control function

control (moveX, moveY, moveZ, angleX, angleY, angleZ, zoom, opt_timestamp)

This method triggers single control action on engine. This will trigger an animation which will start modification of the view's or camera's properties according to values begin set. Modification will occur at every frame. The speed values are measure by 'levels per frame' were 1 level cooresponds to a distance to next zoom level.

endControl (opt_preventKinetics, opt_adjustView)

This method ends current control, which will stop ongoing animation triggered by the startControl method. This method can prevent kinetics as well as it can adjust the final view if the adjust function is being passed.

Interface Description

Control interface defines method which are used for direct view or camera manipulation

Method Details

startControl (opt_kinetics, opt_atX, opt_atY)

This method starts control action for camera. This action allows to control camera animation and movement according to provided values in the H.map.IControl#control function

Parameters:
 
opt_kinetics:
{H.util.kinetics.IKinetics=} [optional]
 
kinetics settings
opt_atX:
{number=} [optional]
 
control starts at x screen coordinate
opt_atY:
{number=} [optional]
 
control starts at y screen coordinate

control (moveX, moveY, moveZ, angleX, angleY, angleZ, zoom, opt_timestamp)

This method triggers single control action on engine. This will trigger an animation which will start modification of the view's or camera's properties according to values begin set. Modification will occur at every frame. The speed values are measure by 'levels per frame' were 1 level cooresponds to a distance to next zoom level.

Parameters:
 
moveX:
{number}
 
moves the view/cam in right/left direction
moveY:
{number}
 
moves the view/cam in bottom/top direction
moveZ:
{number}
 
moves the view/cam in depth direction (changes zoom level)
angleX:
{number}
 
rotates cam over x-axis
angleY:
{number}
 
rotates cam over y-axis
angleZ:
{number}
 
rotates cam over z-axis
zoom:
{number}
 
changes current zoom level (for view works as moveZ)
opt_timestamp:
{number=} [optional]
 

endControl (opt_preventKinetics, opt_adjustView)

This method ends current control, which will stop ongoing animation triggered by the startControl method. This method can prevent kinetics as well as it can adjust the final view if the adjust function is being passed.

Example

//prevent kinetcs
viewModel.endControl(true);

//prevent kinetics and set adjusted view
viewModel.endControl(true, function(requested) {
  requested.zoom = Math.round(requested.zoom);
});
Parameters:
 
opt_preventKinetics:
{boolean=} [optional]
 
if set to true will prevent kinetics animation
opt_adjustView:
{function(H.map.ViewModel.CameraData)=} [optional]
 
user defined function which can adjust the final view this function takes last requestedData from the view model and should return a modified H.map.ViewModel.CameraData which will be set as the final view

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.