none
shouldClipPolygons: What's the expected outcome on true/false RRS feed

  • Question

  • I'm not able to see any differences between shouldClipPolygons true / false.

    What should I be seeing?

    I started from here but the thread seems to have died. http://social.msdn.microsoft.com/Forums/en-US/a32996c3-a452-469a-aa5a-cc2a7b34729b/bing-maps-polylines-polygons-and-pushpins-do-not-redraw-when-off-screen-until-you-stop-panning?forum=bingmapsajax

    I've been testing with polylines, polygons and pins all in one general area (in my project). I've been noticing different behaviors between IE11 and Firefox/Chrome. I'll use the ISDK for a demonstration model here.

    In Chrome(33.0.1750.146) and Firefox(27.0.1), If I pan such that the polygon is off the map AND stop. I can reproduce the situation in the original question. The polygon/polyline will be clipped where ever I stopped. This is true with shouldClipPolygons set to true or false on the MapMode.

    In IE11(11.0.9600.16518), If I do similar panning, the shapes will not be clipped.

    The only way I can get the pushpins clipped on any browsers is by panning several tiles without a full stop (ex: on greater scale than a full window). This is also the only way I can clip the shapes on IE.

    I'm not worried about the second case, but the first one is giving me considerable grief. I haven't turned off inertia in my project and would prefer to keep it enabled for the modern feeling it gives. Of course, that feeling is immediately killed when the shapes just 1 pixel off the side aren't being rendered until a full stop.

    As a workaround for now, is there a method for me to force a redraw? I'm thinking a throttled listener might be an acceptable solution for now.

    Thursday, March 13, 2014 2:47 PM

Answers

  • This is a know bug with no workaround. This issue is that when shapes are out of view they are not rendered. The shouldClipPolygon method tells the map to clip the polygon if part of it is out of view. Very rarely would you notice the different here unless you are rendering a lot of polygons as clipping improves performance.

    http://rbrundritt.wordpress.com

    Thursday, March 13, 2014 3:07 PM

All replies

  • This is a know bug with no workaround. This issue is that when shapes are out of view they are not rendered. The shouldClipPolygon method tells the map to clip the polygon if part of it is out of view. Very rarely would you notice the different here unless you are rendering a lot of polygons as clipping improves performance.

    http://rbrundritt.wordpress.com

    Thursday, March 13, 2014 3:07 PM
  • Ok, thanks

    With better understanding of the bug, I'll use this as a temporary workaround. I increased the size of the containing div and "centered" the map with absolute positioning (100% on all sides). The map is 9 times too large, but it will work for all but the most extreme of cases.

    Is there anyway to track the status of this bug?

    Thursday, March 13, 2014 4:48 PM
  • Unfortunately there is no public list of bugs for Bing Maps.

    http://rbrundritt.wordpress.com

    Friday, March 14, 2014 11:15 AM