Maps API for JavaScript Developer's Guide

H.map.render.p2d.RenderEngine

Class Summary

Extends: H.map.render.RenderEngine

Canvas render engine implementation. This engine will present geo position (camera data) provided by the view model on a 2D canvas element, were all layers are rendered into the single canvas element in provided order. This class contains some additional canvas rendering specific functionality, which can be used by the application.

[ For full details, see the Class Details ]

Method Summary

Table 1. Methods
Methods

setAnimationDuration (duration)

This method changes animation duration for all engine's animations

getAnimationDuration () : {number}

This method returns current animation duration setting for engine's animations

setAnimationEase (easeFunction)

This method allows to set ease for all engine's animations.

getAnimationEase () : {function(number) : number}

This method return current setting for the animation ease.

resetAnimationDefaults ()

This method resets animation settings on the engine to defaults. Duration 300ms and ease to H.util.animation.ease.EASE_OUT_QUAD

addEventListener (type, handler, opt_capture, opt_scope)

This method allows to listen for specific event triggered by the object. Keep in mind, that you must removeEventListener manually or dispose an object when you no longer need it. Otherwise memory leak is possible.

removeEventListener (type, handler, opt_capture, opt_scope)

This method will removed previously added listener from the event target

dispatchEvent (evt)

This method will dispatch event on the event target object

dispose ()

Removes listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners.

addOnDisposeCallback (callback, opt_scope)

This method adds callback which is triggered when the object is being disposed

Events Summary

Table 2. Events
Events

render : {H.util.Event}

Fired when one of the layers or the engine (all layers) has been rendered completely. The event target references either the completed layer or the render engine itself

Class Description

Canvas render engine implementation. This engine will present geo position (camera data) provided by the view model on a 2D canvas element, were all layers are rendered into the single canvas element in provided order. This class contains some additional canvas rendering specific functionality, which can be used by the application.

Constructor Details

H.map.render.p2d.RenderEngine(viewPort, viewModel, dataModel, options)

Parameters:
 
viewPort:
{H.map.ViewPort}
 
viewModel:
{H.map.ViewModel}
 
dataModel:
{H.map.DataModel}
 
options:
{H.map.render.p2d.RenderEngine.Options}
 

Method Details

setAnimationDuration (duration)

This method changes animation duration for all engine's animations

Parameters:
 
duration:
{number}
 

getAnimationDuration () : {number}

This method returns current animation duration setting for engine's animations

Returns:
 
{number}

setAnimationEase (easeFunction)

This method allows to set ease for all engine's animations.

Parameters:
 
easeFunction:
{function(number) : number}
 
function which alters progress. Function will receive progress as parameter which is a values between 0..1 and should return altered values also in 0..1 range.

getAnimationEase () : {function(number) : number}

This method return current setting for the animation ease.

Returns:
 
{function(number) : number}

resetAnimationDefaults ()

This method resets animation settings on the engine to defaults. Duration 300ms and ease to H.util.animation.ease.EASE_OUT_QUAD

addEventListener (type, handler, opt_capture, opt_scope)

This method allows to listen for specific event triggered by the object. Keep in mind, that you must removeEventListener manually or dispose an object when you no longer need it. Otherwise memory leak is possible.

Parameters:
 
type:
{string}
 
name of event
handler:
{!Function}
 
event handler function
opt_capture:
{boolean=} [optional]
 
if set to true will listen in the capture phase (bubble otherwise)
opt_scope:
{Object=} [optional]
 
scope for the handler function

removeEventListener (type, handler, opt_capture, opt_scope)

This method will removed previously added listener from the event target

Parameters:
 
type:
{string}
 
name of event
handler:
{!Function}
 
previously added event handler
opt_capture:
{boolean=} [optional]
 
if set to true will listen in the capture phase (bubble otherwise)
opt_scope:
{Object=} [optional]
 
scope for the handler function

dispatchEvent (evt)

This method will dispatch event on the event target object

Parameters:
 
evt:
{(H.util.Event | string)}
 
event object or event name

dispose ()

Removes listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners.

addOnDisposeCallback (callback, opt_scope)

This method adds callback which is triggered when the object is being disposed

Parameters:
 
callback:
{!Function}
 
The callback function.
opt_scope:
{Object=} [optional]
 
An optional scope to call the callback in.

Event Details

render: {H.util.Event}

Fired when one of the layers or the engine (all layers) has been rendered completely. The event target references either the completed layer or the render engine itself

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.