disableDrag is not working
Hi there.
I'm quite new in Nokia Maps API, and I encountered a problem.
For example^ let's go to nokia maps playground and open the first example.
Then we edit the code adding the line map.disableDrag() in the end of the code.
Then we click on "run" and dragging is still available.
What I am doing wrong?
Re: disableDrag is not working
In the first playground example, a basic map is set up with standard behaviours enabled.
[I]Behaviour [/I]is effectively a simple collection of standard components. This includes such things as dragging, double clicking, zooming and so on.
see: [url]http://api.maps.nokia.com/2.1.1/apireference/symbols/nokia.maps.map.component.Behavior.html[/url] .
To remove the dragging component you could either replace the standard Behaviour with the individual components, or remove individual components:
[CODE]map.removeComponent(map.getComponentById("panning.Drag"));[/CODE]
The [I]disableDrag()[/I] method will stop draggable objects from responding to drag [B]events[/B] and moving across the map, not stop the dragability behaviour of the map itself. It is typically used to make draggable markers into static markers.
If you add the following line at 150 in the mapObjects example [url]http://api.maps.nokia.com/2.1.1/playground/?example=mapobjectevents[/url]
[CODE]imageMarker.disableDrag(); [/CODE]
The image of the Greek temple will no longer be able to be moved around the map.