none
Bing Map Html Overlay location does not stick to map when resize map. RRS feed

  • Question

  • Step to reproduce:

    1) go to https://www.bing.com/api/maps/sdkrelease/mapcontrol/isdk#imageOverlay+JS example

    2) click the right top corn button "show map and printout in new window"

    3) in the Pop-out Map  , change window size.

    4) we can see the image is moving around , not sticking to the location where it used to be

    Reason : there is no easy way to detect onresizeend event in html.

    Good to have: a new option to make map static when size change , meaning the left top will be unchanged instead of the center. Right now if you resize the map , the center will always be the center of map , but everywhere else is shifting.

    We would like to see a new map option that can set the left top corner to be unchanged.

    Thanks,

    Di 


    Monday, July 17, 2017 6:04 PM

Answers

  • Thanks for highlighting this issue. I see the following things should be done:

    1. The viewchangestart event should be firing when the map is starting to be resized.
    2. The viewchange event should be firing when the map is resized. The center and zoom level may not be changing, but the bounding box of the view is. This will fix the issue with custom overlays.
    3. The viewchangeend event should fire when resizing has completed to keep the viewchange event flow in line.

    I'll log the above as a bug.

    I'll also add a feature request to add a 'resized' event to the map, which should fire right after when the viewchangeend event fires.

    Anchoring the top left corner of the map when resizing is too big of a change would cause issues in other apps that have designed their apps to work with the current experience.


    [Blog] [twitter] [LinkedIn]

    Monday, July 17, 2017 7:26 PM

All replies

  • Thanks for highlighting this issue. I see the following things should be done:

    1. The viewchangestart event should be firing when the map is starting to be resized.
    2. The viewchange event should be firing when the map is resized. The center and zoom level may not be changing, but the bounding box of the view is. This will fix the issue with custom overlays.
    3. The viewchangeend event should fire when resizing has completed to keep the viewchange event flow in line.

    I'll log the above as a bug.

    I'll also add a feature request to add a 'resized' event to the map, which should fire right after when the viewchangeend event fires.

    Anchoring the top left corner of the map when resizing is too big of a change would cause issues in other apps that have designed their apps to work with the current experience.


    [Blog] [twitter] [LinkedIn]

    Monday, July 17, 2017 7:26 PM
  • Thanks for the fast response . Appreciate it.
    Monday, July 17, 2017 9:50 PM