×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2012
    Posts
    3

    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?

  2. #2
    Regular Contributor
    Join Date
    Aug 2011
    Location
    Berlin
    Posts
    288

    Re: disableDrag is not working

    In the first playground example, a basic map is set up with standard behaviours enabled.
    Behaviour is effectively a simple collection of standard components. This includes such things as dragging, double clicking, zooming and so on.
    see: http://api.maps.nokia.com/2.1.1/apir....Behavior.html .

    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"));
    The disableDrag() method will stop draggable objects from responding to drag events 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 http://api.maps.nokia.com/2.1.1/play...apobjectevents
    Code:
    imageMarker.disableDrag();

    The image of the Greek temple will no longer be able to be moved around the map.

Similar Threads

  1. Bluetooth connection working in emulator, but not working on Nokia E52
    By voroske.julia in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2011-05-30, 13:01
  2. WebPost not working on device, working fine on emulator
    By swarupk2007 in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2010-02-09, 14:59
  3. Replies: 2
    Last Post: 2006-03-11, 09:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •