Skip to content

Modules

Dmytro Verbovyi edited this page Dec 7, 2018 · 6 revisions

HereMaps modules

Controls

Initialize directive with the 'controls' attribute for adding UI Components to the Map:

    <div heremaps options="mapOptions" controls></div>

Result:

Maps with default controls

Managing controls position

Supported values for aligning controls in relation to map corners are: top-left, top-right, bottom-left and bottom-right.

The result of the example below will position controls in the bottom-right corner:

    <div heremaps options="mapOptions" controls="bottom-right"></div>

Events

To enable Here Maps event system, the 'events' attribute should be added.

    <div heremaps options="mapOptions" controls="bottom-right" events="listeners"></div>
    $scope.listeners = {
        click: function(){},
        mousemove: function() {},
        mouseleave: function() {},
        mouseenter: function() {},
        drag: function() {},
        dragstart: function() {},
        dragend: function() {},
        mapviewchange: function() {},
        mapviewchangestart: function() {},
        mapviewchangeend: function() {}
    }

To enable map dragging, the draggable option should be equal to true in options

Clone this wiki locally