Skip to content

Commit

Permalink
Merge pull request #7991 from AnalyticalGraphicsInc/polygonHoles
Browse files Browse the repository at this point in the history
Add support for polygon holes to CZML
  • Loading branch information
mramato authored Jul 11, 2019
2 parents 969f126 + 8de581d commit 254375b
Show file tree
Hide file tree
Showing 11 changed files with 2,139 additions and 1,136 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,70 @@
3600, -45, 65, 3000
]
}
}, {
"id": "Polygon with Dynamic Holes",
"polygon": {
"positions": {
"cartographicDegrees" : [
-110, 43, 0,
-90, 43, 0,
-90, 30, 0,
-110, 30, 0
]
},
"holes": {
references: [
[
'target4#position',
'target5#position',
'target6#position'
]
]
},
"material": {
"solidColor": {
"color": {
"rgba" : [255, 150, 0, 255]
}
}
}
}
},{
"id": "target4",
"position": {
"interpolationAlgorithm": "LINEAR",
"interpolationDegree": 1,
"interval" : "2012-08-04T16:00:00Z/2012-08-04T17:00:00Z",
"epoch" : "2012-08-04T16:00:00Z",
"cartographicDegrees": [
0, -100, 41, 0,
3600, -95, 41, 0
]
}
},{
"id": "target5",
"position": {
"interpolationAlgorithm": "LINEAR",
"interpolationDegree": 1,
"interval" : "2012-08-04T16:00:00Z/2012-08-04T17:00:00Z",
"epoch" : "2012-08-04T16:00:00Z",
"cartographicDegrees": [
0, -92, 42, 0,
3600, -92, 36, 0
]
}
},{
"id": "target6",
"position": {
"interpolationAlgorithm": "LINEAR",
"interpolationDegree": 1,
"interval" : "2012-08-04T16:00:00Z/2012-08-04T17:00:00Z",
"epoch" : "2012-08-04T16:00:00Z",
"cartographicDegrees": [
0, -95, 37, 0,
3600, -108, 38, 0
]
}
}];

var viewer = new Cesium.Viewer('cesiumContainer', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@
-35, 20, 0
]
}],
"holes": [{
"interval" : "2012-08-04T16:00:00Z/2012-08-04T16:20:00Z",
"cartographicDegrees" : [
[
-47, 35, 0,
-46, 25, 0,
-42, 30, 0
]
]
}],
"material": {
"solidColor": {
"color": [{
Expand Down
35 changes: 35 additions & 0 deletions Apps/Sandcastle/gallery/CZML Polygon.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,41 @@
"rgba" : [0, 0, 0, 255]
}
}
}, {
"id" : "bluePolygonWithHoles",
"name" : "Blue polygon with holes",
"polygon" : {
"positions" : {
"cartographicDegrees" : [
-82.0, 40.8, 0,
-83.0, 36.5, 0,
-76.0, 35.6, 0,
-73.5, 43.6, 0
]
},
"holes" : {
"cartographicDegrees" : [
[
-81.0, 40.0, 0,
-81.0, 38.2, 0,
-79.0, 38.2, 0,
-78.0, 40.8, 0
],
[
-77.5, 36.7, 0,
-78.5, 37.0, 0,
-76.5, 39.6, 0
]
]
},
"material" : {
"solidColor" : {
"color" : {
"rgba" : [0, 0, 255, 255]
}
}
}
}
}];

var viewer = new Cesium.Viewer('cesiumContainer');
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Change Log
* Reworked label rendering to use signed distance fields (SDF) for crisper text. [#7730](https://github.com/AnalyticalGraphicsInc/cesium/pull/7730)
* Added a [new Sandcastle example](https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Labels%20SDF.html) to showcase the new SDF labels.
* Added `totalScale` property to `Label` which is the total scale of the label taking into account the label's scale and the relative size of the desired font compared to the generated glyph size.
* Added support for polygon holes to CZML. [#7991](https://github.com/AnalyticalGraphicsInc/cesium/pull/7991)

##### Fixes :wrench:
* `PolygonGraphics.hierarchy` now converts constant array values to a `PolygonHierarchy` when set, so code that accesses the value of the property can rely on it always being a `PolygonHierarchy`.

### 1.59 - 2019-07-01

Expand Down
Loading

0 comments on commit 254375b

Please sign in to comment.