none
Calling MapControl.TrySetViewBoundsAsync with a single-coordinate box takes you around the world RRS feed

  • Question

  • On 16299.19, I'm seeing surprising results when calling TrySetViewBoundsAsync on a loaded MapControl using a box with identical NW and SE boundaries (yes, I know, but should we have to check?) :

    Box -- NW: 37.43544,-113.2017, SE: 37.43544,-113.2017 -- this is somewhere in Utah.

    Resulting map center -- 37.43681,66.79845 -- this is somewhere north of Mazari Sharif.

    Scaling on affected PC is 113% or so.

    Incidentally, calling TrySetSceneAsync on equivalent input works fine.

    Sunday, October 22, 2017 4:56 AM

Answers

  • This is a known issue with the current Windows build that will be fixed in the next release. The control mistakenly assumes your bounding box is going around the world completely and so you'll end up with a point on the other side of the earth.

    As a short term workaround, don't send in a 0 size bounding box (which really has undefined behavior anyway).

    Monday, April 9, 2018 4:36 PM
    Moderator

All replies

  • On 16299.19, I'm seeing surprising results when calling TrySetViewBoundsAsync on a loaded MapControl using a box with identical NW and SE boundaries (yes, I know, but should we have to check?) :

    Box -- NW: 37.43544,-113.2017, SE: 37.43544,-113.2017 -- this is somewhere in Utah.

    Resulting map center -- 37.43681,66.79845 -- this is somewhere north of Mazari Sharif.

    Scaling on affected PC is 113% or so.

    Incidentally, calling TrySetSceneAsync on equivalent input works fine.

    I also facing the same issue. Can you please check?

    Rohit Garg.

    Monday, April 9, 2018 8:21 AM
  • This is a known issue with the current Windows build that will be fixed in the next release. The control mistakenly assumes your bounding box is going around the world completely and so you'll end up with a point on the other side of the earth.

    As a short term workaround, don't send in a 0 size bounding box (which really has undefined behavior anyway).

    Monday, April 9, 2018 4:36 PM
    Moderator