Problem position imagelayer

Hello

I have a problem of positioning the weather image, i need your help ! :slight_smile:
I will explain to you.

I want to display weather data on the globe according to coordinates

So I retrieve the coordinates of the view with computeViewRectangle, then I ask a remote base the weather image corresponding to my view with its coordinates and then I integrate the image into Cesium.

Here is my simple code:

var imageryLayers = viewer.imageryLayers;
var rect = viewer.scene.camera.computeViewRectangle();
north = rect.north;
south = rect.south;
west = rect.west;
east = rect.east;

var mylayer = imageryLayers.addImageryProvider(new Cesium.SingleTileImageryProvider({
  url : url,
        rectangle : Cesium.Rectangle(west, south, east, north)
  }));

But the image is not positioned in the right place, look!

//Image from the weather database and displayed on their map
http://hpics.li/8be8ef1

//Image alone i download from the weather database
http://hpics.li/903c2b6

//Then image integrated on Cesium
http://hpics.li/34bc215

I do not know where the error came from.I know of no other way to do it.
So can you help me please ? :slight_smile:

p.s: I have to convert the coordinates in degree to get the weather image from my database

Hey there,

Do you have the exact location that the imagery should be positioned at from the weather database? It looks like you are creating the location of the TileImageryProvider from the current view of the camera (with viewer.scene.camera.computeViewRectangle) rather than the absolute position of the data.

Thanks!

Gabby