none
Bing Maps v8 Unexpected zIndex and viewchange Event Behavior With Streetside RRS feed

  • Question

  • I am seeing a standard InfoBox added before switching to Streetside fading in and out after entering Streetside and using keyboard navigation keys. 

    Is there undocumented zIndex behavior after entering Streetside?

    I am also seeing the viewchange event used on a CustomOverlay not firing for all frames. 

    For example,

    ib.setOptions({
    visible:true,
    });
    pp_pan(map,ib);//this pans the map to ensure ib is visible

    After the above code, ib (which is positioned by geographic coordinates) does not appear in the correct location. Panning the map slightly to trigger a viewchange event correctly repositions ib.  Adding viewchangeend to the CustomOverlay also appears to fix this.

    After entering Streetside, navigating around, and returning, I am seeing ib not positioned correctly.  Again manually causing a viewchange event triggers correct positions.  

    It appears tryLocationToPixel is not timed to succeed with viewchange and other events to keep CustomOverlay items positioned correctly.

    Is there some was to get correct positions after returning from Streetside?

     







    Saturday, August 5, 2017 4:03 AM

Answers

  • Yes, the above results are with the experiential branch. 

    I tested more. 

    With the panning immediately after InfoBox visible, I am seeing tryLocationToPixel return success; however, an extra vewchangeend event is required to keep CustomOverlay items positioned. 

    With incorrectly positioned items on returning from Streetside, I see viewchange, viewchangeend, and maptypechanged events fire but tryLocationToPixel doesn't return success before the last firing of these events. The result is CustomOverlay items are left unpositioned. 

    As a workaround, a 500ms second delay in the update call in the maptypechanged handler works in tests but with a noticeable delay. 

    Any info on what the shortest but safest delay would be (before an update, if any)? 

    Thanks for checking this out, by the way.



    Saturday, August 5, 2017 11:36 PM

All replies

  • have you tried this with the experimental branch? I believe a similar issue was reported and recently fix.

    [Blog] [twitter] [LinkedIn]

    Saturday, August 5, 2017 8:19 PM
  • Yes, the above results are with the experiential branch. 

    I tested more. 

    With the panning immediately after InfoBox visible, I am seeing tryLocationToPixel return success; however, an extra vewchangeend event is required to keep CustomOverlay items positioned. 

    With incorrectly positioned items on returning from Streetside, I see viewchange, viewchangeend, and maptypechanged events fire but tryLocationToPixel doesn't return success before the last firing of these events. The result is CustomOverlay items are left unpositioned. 

    As a workaround, a 500ms second delay in the update call in the maptypechanged handler works in tests but with a noticeable delay. 

    Any info on what the shortest but safest delay would be (before an update, if any)? 

    Thanks for checking this out, by the way.



    Saturday, August 5, 2017 11:36 PM