fromDegrees not mapping the same as my KML

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="">

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.

Just a graphic to show what I am seeing:


Instead of using a rectangle, try using a polygon with those four coordinates:

polygon : {
hierarchy : Cesium.Cartesian3.fromDegreesArray([-156.6225,20.5594444444444,
material : Cesium.Color.RED


The rectangle is meant to follow the longitude and latitude lines, which is why it doesn’t line up.



indeed that worked! Though using my image as a material still doesn't line up (I am guessing it is a scaling/zoom level issue). I might have to throw in the towel on hacking a work around to get images tiled onto the virtual globe for now . I just cannot seem to find a way that makes this work. On a whim I tried this even:

            layers.addImageryProvider(new Cesium.SingleTileImageryProvider({
                url : 'Sandcastle/images/test.png',
                polygon : Cesium.Cartesian3.fromDegreesArray([-156.6225,20.5594444444444,

Maps the test.png to the entire globe, I am guessing SingleTileImageryProvider does not like a rectangle property.

Oh okay, I understand what you’re trying to do now. We don’t currently have support for KML lat lon quads and projecting the image to rectangles like this.
It’s part of our KML roadmap:

I’m not sure how long it will be before we have a chance to address this though.

You can take a look at this issue to see how they worked around adding an image: