Class nokia.maps.map.Display.MapViewChangeEvent
Class Summary
This class represents an event used to signal changes of the map view. A map view is defined by the following display properties:
- nokia.maps.map.Display.Properties#center
- nokia.maps.map.Display.Properties#zoomLevel
- nokia.maps.map.Display.Properties#heading
- nokia.maps.map.Display.Properties#tilt
- nokia.maps.map.Display#width
- nokia.maps.map.Display#height
Extends
nokia.maps.map.Object.Event.
new nokia.maps.map.Display.MapViewChangeEvent
([defaults])
Method Summary
cancel
()
: nokia.maps.dom.Event
This method cancels the given event.
clone
()
: nokia.maps.dom.Event
This method clones the given event without cloning the properties (non-recursive cloning only).
preventDefault
()
: nokia.maps.dom.Event
This method cancels the default action for the given event.
preventUnload
(msg)
: nokia.maps.dom.Event
This method can be used only when the given event is of the type "beforeunload" to ask the user to confirm whether he wants to leave the page.
stopImmediatePropagation
()
: nokia.maps.dom.Event
This method prevents other event listeners from being triggered and, in contrast to
Event.stopPropagation(), its effect is immediate.
stopPropagation
()
: nokia.maps.dom.Event
This method prevents other event listeners from being triggered, but its effect is deferred until all event listeners attached on the
Event.currentTarget have been triggered.
Field Summary
Number
AT_TARGET
This field is an event phase identifier, indicating the target phase, which means it is being evaluated at the event target.
Number
BUBBLING_PHASE
This field is an event phase identifier, indicating the bubbling phase.
Number
CAPTURING_PHASE
This field is an event phase identifier, indicating the capture phase.
static
Number
MAPVIEWCHANGE_CENTER
This constant represents a bit flag that indicates a change in coordinates of the map center.
static
Number
MAPVIEWCHANGE_HEADING
This constant represents a bit flag that indicates a change in the heading (bearing) of the map.
static
Number
MAPVIEWCHANGE_SIZE
This constant represents a bit flag that indicates a change in the size of the display.
static
Number
MAPVIEWCHANGE_TILT
This constant represents a bit flag that indicates a change in the tilt of the map.
static
Number
MAPVIEWCHANGE_ZOOM
This constant represents a bit flag that indicates a change in the map zoom level.
Number
PROPAGATION_OK
This field is an identifier, indicating that the propagation of the event has not been stopped.
Number
PROPAGATION_STOP
This field is an identifier, indicating that the propagation of the event has been stopped.
Number
PROPAGATION_STOP_IMMEDIATE
This field is an identifier, indicating that the propagation of the event has been stopped with immediate effect.
Boolean
bubbles
This property indicates whether the event is a bubbling event (
true) or not (false).
Boolean
canBubble
This property indicates whether the event can bubble (
true) or not (false).
Boolean
canSicker
This property indicates whether the event can sicker (whether in the capture phase, listeners can be iterated from the top down) or not.
Boolean
cancelable
This property indicates whether or not an event can have its default action canceled (prevented).
nokia.maps.dom.EventTarget
currentTarget
This property indicates the object whose
eventListeners are currently being processed.
Number
data
This bitmask property contains cumulative information about the map view properties which were altered during display rendering.
Boolean
defaultPrevented
This property indicates whether
preventDefault() has been called for this event.
nokia.maps.map.Display
display
This property contains the reference to the display within which the event occurred, if applicable.
nokia.maps.map.Object[]
displayObjects
This property holds an array of all map objects under the event position reflecting the z-index oder of the objects (the first element in the aray is the topmost visible visilble object, and the last one is the object with the highest z-index).
Number
displayX
This property holds the horizontal pixel position where the event occurred relative to the top-left corner of the display associated with the event.
Number
displayY
This property holds the vertical pixel position where the event occurred relative to the to the top-left corner of the display associated with the event.
Number
eventPhase
This property indicates the phase in the event flow the given event has reached.
String
namespaceURI
This property holds the namespace URI associated with the event or
null if it is unspecified.
Event
nativeEvent
This property holds a reference to the native DOM event on which the given normalized event object is based.
nokia.maps.dom.Page
page
This property holds a reference to the page to which the given event relates.
Number
propagation
This property indicates the status of event propagation.
nokia.maps.dom.EventTarget
target
This property holds the target object of the event.
Number
timeStamp
This property specifies the time at which the event was created in milliseconds relative to 1970-01-01T00:00:00Z.
String
type
This property holds the local name of the event type.
Direct Inheritance
Indirect Inheritance
Inherited from nokia.maps.dom.Event:
cancel
clone
preventDefault
preventUnload
stopImmediatePropagation
stopPropagation
AT_TARGET
BUBBLING_PHASE
CAPTURING_PHASE
PROPAGATION_OK
PROPAGATION_STOP
PROPAGATION_STOP_IMMEDIATE
bubbles
canBubble
canSicker
cancelable
currentTarget
defaultPrevented
eventPhase
namespaceURI
nativeEvent
page
propagation
target
timeStamp
type
Constructor Detail
This method initializes a new instance of MapViewChangeEvent
new nokia.maps.map.Display.MapViewChangeEvent([defaults])
Parameters:
| {Object} | [defaults] | see constructor parameter of nokia.maps.dom.Event |
Field Detail
static
Number
MAPVIEWCHANGE_CENTER
This constant represents a bit flag that indicates a change in coordinates of the map center.
static
Number
MAPVIEWCHANGE_HEADING
This constant represents a bit flag that indicates a change in the heading (bearing) of the map.
static
Number
MAPVIEWCHANGE_SIZE
This constant represents a bit flag that indicates a change in the size of the display.
The size of the display is defined by the properties nokia.maps.map.Display#width
and nokia.maps.map.Display#height
static
Number
MAPVIEWCHANGE_TILT
This constant represents a bit flag that indicates a change in the tilt of the map.
static
Number
MAPVIEWCHANGE_ZOOM
This constant represents a bit flag that indicates a change in the map zoom level.
Number
data
This bitmask property contains cumulative information about the map view properties which were altered
during display rendering. It is only set for nokia.maps.map.Display#event:mapviewchange,
otherwise it is always
0.
Examples:
// Use bitwise "&" operator, to check for specific map view property changes:
map.addListener("mapviewchange", function (event) {
if (event.data & event.MAPVIEWCHANGE_CENTER) {
console.log("map view changed: center");
}
});
