But when I press left mouse button and then move mouse over the map, no "mouse move" event occurs.
Also, when I release button, no "mouse up" event occurs.
This is because the drag event is fired instead of mousemove if the button is down.
Similarly dragend is fired instead of mouseup.
But, when I click left mouse buttons, both "mouse down" and "mouse up" events occurs simultaneously.
This is to be expected as a click will be a mousedown followed by a mouseup. If you press down and then move the mouse, you'll get mousedown, drag and dragend instead,
The best way to work out what is happening is to send, lots of debug to the console.
Try this snippet below and look at the console output in FireBug to see all the various events being fired.
Code:
var map = new nokia.maps.map.Display(
document.getElementById("map"), {
// components: [new nokia.maps.map.component.Behavior()],
zoomLevel: 11,
center: [38.4188500, 27.1287200]
}
);
map.addListener("mousemove", function(evt) {
console.log(evt);
});
map.addListener("mouseup", function(evt) {
console.log(evt);
});
map.addListener("mousedown", function(evt) {
console.log(evt);
});
map.addListener("drag", function(evt) {
console.log(evt);
});
map.addListener("dragstart", function(evt) {
console.log(evt);
});
map.addListener("dragend", function(evt) {
console.log(evt);
});