AnalyticalGraphicsInc/cesium — pull request #2353 by mramato (2014-12-29 17:47:49+00:00)
Title: PolygonGraphics.hiearchy

This can wait until after 1.6 instead of rushing it into master; I'll probably pull it into the `implicit-properties` branch first; to aid with other efforts.

* Added `PolygonHierarchy` to Core to make defining polygons with holes clearer.
* `PolygonGraphics.positions` was deprecated and replaced with `PolygonGraphics.hierarchy`, which evaluates to a `PolygonHierarchy` instead of an array of positions.
* `GeoJsonDataSource` now supports polygons with holes.
* `ConstantProperty` can now hold any value; previously it was limited to values that implemented `equals` and `clones` functions, as well as a few special cases.
* CZML does not yet have support for holes and is still creating an array of positions instead of a `PolygonHierarchy`, which is still supported during the deprecation period. I'm still trying to determine the best way to do holes in CZML (which will most likely be a separate pull request unless anyone has any objections).
* `PolygonGraphics.positions` created by `GeoJSONDataSource` now evaluate to a `PolygonHierarchy` object instead of an array of positions. __This one is technically a breaking change__ I could probably jump through some additional hoops to avoid this if we think it's important; but it's an easy fix for anyone it may affect.

The overall goal is to move exclusively to the `hiearchy` property for `PolygonGraphics` and have it always evaluate to a `PolygonHierarchy` object. This simplifies the API for end users.

@bagnell Some of the GeoJSON files we test with look worse when using holes. I think it may be a big on our end; I'll see if I can pull together some examples for you to look at.