I am trying to get an entity (or a SingleTileImageryProvider anyone i can get to work) to map my image to a globe. I have a kml file that maps/looks right (no imagery stuff just a box).
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Placemark>
<name>Maui</name>
<visibility>1</visibility>
<styleUrl>#transBluePoly</styleUrl>
<Polygon>
<tessellate>1</tessellate>
<altitudeMode>absolute</altitudeMode>
<outerBoundaryIs>
<LinearRing>
<coordinates>
-156.6225,20.5594444444444,1000
-156.676388888889,20.8205555555556,1000
-156.205833333333,20.9055555555556,1000
-156.1525,20.6447222222222,1000
</coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
</kml>
So I have tried this code in the entities to map a rectangle:
var redRectangle = viewer.entities.add({
name : 'Red translucent rectangle with outline',
rectangle : {
coordinates : Cesium.Rectangle.fromDegrees(-156.6225,20.5594444444444,-156.1525,20.6447222222222),
material : Cesium.Color.RED.withAlpha(0.5),
outline : true,
outlineColor : Cesium.Color.RED
}
I am not sure where my disconnect is but this is not even coming close to the foot print in the KML file. Not sure what I am doing wrong but getting these to match up would be awesome. Then I could ignore the fact that cesium doesn't handle tiled imagery in my kmz and just map the one image 1:1 onto the globe as a stop gap measure until further support for regions exists in Cesium.