Is it possible to color everything outside of a polygon geometry? For example, if I had a RectangleGeometry inside the U.S. then everything outside of that RectangleGeometry would be colored differently. Initially I looked at the SandCastle Polygon example and the PolygonHierarchy seemed to the best approach, so I created a PolygonHierarchy with 6 positions that fill the globe with a color. Next I added a hole of a rectangle inside the U.S. that I thought would be a hole within this polygon.
So, this is what it looks like when I fill the globe, which appears to work okay except it takes 10+ seconds to render, when compared to 1 second for a normal RectanglePolygon:
Next, when I add a rectangle hole (taken from the original Polygon sandcastle demo) in the U.S., I see the following unexpected result:
However, I expected to see something like the following (except the non-hole polygon fills the rest of the globe):
Here’s a Github gist of the Sandcastle code that can illustrate the above problems (PolygonHierarchy takes too long to render when compared to a normal RectanglePolygon and holes don’t appear properly?): https://gist.github.com/minhongrails/b7e5fea5813cbe9ecfe5
Does anyone know of any alternative approaches? I was thinking of just creating my own polygon that replicates the PolygonHierarchy but it would be nice to use the existing API if possible.