none
Zoom on 'dblclick' is intentionally disabled, but on a smartphone (Android 4.0.4) it happens nevertheless RRS feed

  • Question

  • Hello,

    as the title already stated i want to disable the 'dblclick' zoom on maps. This works for browsers (chrome / safari) by inserting the e.handled = true statement, before my custom handler work takes place. But on a smartphone the zoom and my custom handler work are done both. What am i doing wrong? I can't figure it out.

    In case it is important. I'm using the Sencha Touch Framework (2.1.1) and the Bing Maps AJAX control 7.

    Kind regards,

    Paul


    • Edited by pakrom Thursday, January 31, 2013 4:24 PM
    Thursday, January 31, 2013 4:22 PM

Answers

  • Well, you are handling a click event but it's a touch event that is zooming the map. I would recommend using a more widely used user experience for this situation. Perhaps let the user turn on edit mode and drop a pushpin to the center of the map and let them drag it around.

    http://rbrundritt.wordpress.com

    Friday, February 1, 2013 5:29 PM

All replies

  • Mobile devices use touch events instead of mouse events. This is likely why your dbclick event isn't being called. Are you trying to disable zooming all together? If so then just use the disableZooming map option:http://msdn.microsoft.com/en-us/library/gg427603.aspx

    http://rbrundritt.wordpress.com

    • Proposed as answer by Ricky_Brundritt Thursday, January 31, 2013 6:47 PM
    • Unproposed as answer by pakrom Friday, February 1, 2013 6:40 AM
    Thursday, January 31, 2013 6:47 PM
  • It should be possible to zoom. The 'dblclick'-event must be called because  placement of a pushpin on the location works. This works flawlessly. The problem is that on mobile devices additionally the zoom triggers.  As i am understanding the documentation right, it shouldn't matter whether the map is clicked by a mouse device or via tap. So i expect the same behavior. But this expectation is wrong. There must be a trick to handle this. 
    Thursday, January 31, 2013 7:02 PM
  • This appears to be a bug in the Android operating system and how it handles touch/mouse events.

    http://rbrundritt.wordpress.com

    Friday, February 1, 2013 9:38 AM
  • i just tested it on iPhone 4 and iPad2. The behavior is the same as on android systems. So i don't think its a bug special to Android operating system.

    Friday, February 1, 2013 10:00 AM
  • Well, you are handling a click event but it's a touch event that is zooming the map. I would recommend using a more widely used user experience for this situation. Perhaps let the user turn on edit mode and drop a pushpin to the center of the map and let them drag it around.

    http://rbrundritt.wordpress.com

    Friday, February 1, 2013 5:29 PM
  • Thanks for trying to help. I will look into it as a last measure.
    Monday, February 4, 2013 7:55 AM