Ovi Maps API Reference

NamespaceThe namespace is really just an object where further objects and their methods and properties are attached bundling up all the functionality using a unique name.

InterfaceThe Interface is a contract by which the implementing class adheres. It describes a desired behavior and enforces adherence for any class that implements the interface.

ClassClasses define types of objects that will be used by the application.

MethodA function associated with a class or object.

FieldA variable associated with a class or object.

Inherited MethodA function inherited from the parent class. The present documentation scheme differentiates between a direct or indirect inheritance relationship.

Inherited FieldA variable inherited from the parent class. The present documentation scheme differentiates between a direct or indirect inheritance relationship.

EventEvents are actions that occur because of user interaction. They are normally used in combination with functions, and the function will not be executed before the event occurs.

Class ovi.mapsapi.map.component.panning.Kinetic

Class Summary

The kinetic component will add kinetic panning possibilities to the display. If being added to a display certain
other component will automatically detect that and use the kinetic panning, e.g. the panning.Click, panning.Tap
and panning.Drag components.

A kinetic panning persists out of two phases, the movement and the sliding phase. Within the first phase the map
is moved, these movements and their timings are recorded so that the kinetic panning module knows how fast the
map is currently moving and into which direction. Within the second phase, the sliding phase, the kinetic component
will simulate what happens when the map is released while moving into the recorded direction with the recorded
speed (pixel per second), so the map will run after as if a pysical map would have been dragged and then suddenly
released.

It is possible to use the kinetic panning as well from other components. Because it must be avoided that two
kinetic pannings are running at the same time, the component implements mechanisms to ensures that only one kinetic
panning at a time is performed. Example of how a kinetic panning shall be done:

// Query for the kinetic component.
var kineticComponent = display.getComponentById("panning.Kinetic");
// Initialize the kinetic engine to record a new movement, it directly
// starts within the movement phase.
var kineticMovement = kineticComponent.startMovement();
// Move the map, if the last parameter is omitted no movement will occurr
// (simulation mode), the kinetic panning component will just recognize it
// for the sliding phase calculations.
kineticMovement.moveBy(10, 10, true);
//...
// Finish the recording and release the map, which will cause the
// sliding phase to start. You can't reuse a kinetic movement, therefore
// after calling "endMovement" all further calls to moveBy will be
// ignored.
kineticMovement.endMovement();
// From now on the map will slide until stop at the kinetic movement
// is called or the map speed reduced to zero due to the fraction.
kineticMovement.addObserver(
"finished",
function(kineticMovement, key, value, oldValue) {
if (value===true)
alert("kinetic movement "+(this.aborted?"was aborted":"finished successfully")+"!");
},
this
);

The kinetic component will add kinetic panning possibilities to the display. If being added to a display certain
other component will automatically detect that and use the kinetic panning, e.g. the panning.Click, panning.Tap
and panning.Drag components.

A kinetic panning persists out of two phases, the movement and the sliding phase. Within the first phase the map
is moved, these movements and their timings are recorded so that the kinetic panning module knows how fast the
map is currently moving and into which direction. Within the second phase, the sliding phase, the kinetic component
will simulate what happens when the map is released while moving into the recorded direction with the recorded
speed (pixel per second), so the map will run after as if a pysical map would have been dragged and then suddenly
released.

It is possible to use the kinetic panning as well from other components. Because it must be avoided that two
kinetic pannings are running at the same time, the component implements mechanisms to ensures that only one kinetic
panning at a time is performed. Example of how a kinetic panning shall be done:

// Query for the kinetic component.
var kineticComponent = display.getComponentById("panning.Kinetic");
// Initialize the kinetic engine to record a new movement, it directly
// starts within the movement phase.
var kineticMovement = kineticComponent.startMovement();
// Move the map, if the last parameter is omitted no movement will occurr
// (simulation mode), the kinetic panning component will just recognize it
// for the sliding phase calculations.
kineticMovement.moveBy(10, 10, true);
//...
// Finish the recording and release the map, which will cause the
// sliding phase to start. You can't reuse a kinetic movement, therefore
// after calling "endMovement" all further calls to moveBy will be
// ignored.
kineticMovement.endMovement();
// From now on the map will slide until stop at the kinetic movement
// is called or the map speed reduced to zero due to the fraction.
kineticMovement.addObserver(
"finished",
function(kineticMovement, key, value, oldValue) {
if (value===true)
alert("kinetic movement "+(this.aborted?"was aborted":"finished successfully")+"!");
},
this
);