locked
[MapControl] MapControl Potential Bug RRS feed

  • Question

  • I created a Windows.UI.Xaml.Controls.MapControl in a universal app and have PanInteractionMode, ZoomInteractionMode, and TiltInteractionMode all set to Disabled.  The map does not pan using one finger, but it does using two+ fingers.  Is this by design or a bug?  If by design, is there a way to disable this two-finger panning?


    • Edited by Fred Bao Wednesday, December 16, 2015 5:11 AM add the tag
    Tuesday, December 15, 2015 9:41 PM

Answers

  • Set PanInteractionMode to diasabled can not make the muti-touch input to change the map location.

    And I find the similarity problem in MSDN. And this is the solution. 

    A couple of things you could try is to capture the center point of the map and when use the CenterChanged event. When the event fires, update the center value to your stored value. This won't lock the center view but will snap the map back to the center location when the user releases the map.

    Alternatively you could look at using the pointer events and disabling then by marking them as handled. Try the PointerPressed event. If you take this approach you would then need to add some extra logic as I assume you won't always want to disable this event.

    Best regards,

    Jayden Gu

    • Proposed as answer by Fred Bao Monday, December 21, 2015 6:57 AM
    • Marked as answer by Fred Bao Wednesday, December 23, 2015 6:53 AM
    Wednesday, December 16, 2015 6:03 AM

All replies

  • Set PanInteractionMode to diasabled can not make the muti-touch input to change the map location.

    And I find the similarity problem in MSDN. And this is the solution. 

    A couple of things you could try is to capture the center point of the map and when use the CenterChanged event. When the event fires, update the center value to your stored value. This won't lock the center view but will snap the map back to the center location when the user releases the map.

    Alternatively you could look at using the pointer events and disabling then by marking them as handled. Try the PointerPressed event. If you take this approach you would then need to add some extra logic as I assume you won't always want to disable this event.

    Best regards,

    Jayden Gu

    • Proposed as answer by Fred Bao Monday, December 21, 2015 6:57 AM
    • Marked as answer by Fred Bao Wednesday, December 23, 2015 6:53 AM
    Wednesday, December 16, 2015 6:03 AM
  • Hello bgulrich,

    I made a test according to your description, and got your same result: the map could be panning when using two fingers. I tried to disable its manipulation and tap events, however, it seems not to work as well. For this scenario, I am not quite sure this is by designed, I would help consult it internally and as soon as we get any result, I would post an update to here, and I checked the workaround provided Jayden, it worked, you could also use this workaround as a solution.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Fred Bao Wednesday, December 23, 2015 6:53 AM
    Wednesday, December 16, 2015 6:09 AM