none
AdvancedShapes Polygon not displaying all member polygons RRS feed

  • Question

  • We are just getting started with the v7  JavaScript libraries from Bing and have been using the advanced shapes module to draw multipolygons.

    I have some shapes that don't appear to draw all their polygons and some won't draw at all depending on the order the individual polygons are added to the array of vertices for the advanced polygon.

    I have an example, but it doesn't appear I can attach a file to the forum post? In the example I have, the problem polygon is disjoint from the rest of the polygons (it's not within the interior of the rest of the shape).

    Any suggestions on how to proceed?


    Saturday, May 25, 2013 6:00 PM

Answers

  • MultiPolygons and Complex polygons are two different things. A complex polygon is a polygon with holes. The first set of vertices in these polygons is the outer ring, all subsequent sets of vertices are inner polygons. To handle MultiPolugons you have to separate each polygon. What I normally do for this is create an EntityCollection for a Multipolygon and place all the polygons in one collection. This is how the Well Know Text module works here: http://bingmapsv7modules.codeplex.com/wikipage?title=Well%20Known%20Text%20Reader%2fWriter

    http://rbrundritt.wordpress.com

    Tuesday, May 28, 2013 8:34 AM

All replies

  • MultiPolygons and Complex polygons are two different things. A complex polygon is a polygon with holes. The first set of vertices in these polygons is the outer ring, all subsequent sets of vertices are inner polygons. To handle MultiPolugons you have to separate each polygon. What I normally do for this is create an EntityCollection for a Multipolygon and place all the polygons in one collection. This is how the Well Know Text module works here: http://bingmapsv7modules.codeplex.com/wikipage?title=Well%20Known%20Text%20Reader%2fWriter

    http://rbrundritt.wordpress.com

    Tuesday, May 28, 2013 8:34 AM
  • Thanks Richard. I will confirm that all of our display issues are *multi* polygons not complex (donuts) polygons. I know the example I have in hand is a multi. One of the 5 polys in the KML is separate from the rest.
    Wednesday, May 29, 2013 5:19 PM