is there possible for set rotation and scale to raster static image source in open layer 6

394 Views Asked by At

I have tried

  • I am displaying raster images on map using this sample code is
const url = imagurl;
    const extent = [0, 0, imageData.width, imageData.height];
    const projection = new Projection({
      code: 'xkcd-image',
      units: 'pixels',
      extent,
    });

    const imageLayer = new ImageLayer({
      source: new Static({
        url,
        projection,
        imageExtent: extent,
      }),
    });
  • and i am using affine transformation lib and returns scaling, rotation and transformation..
  • its giving the values
scaling : 327.805670381418,327.805670381418
rotation : -0.1310210334156003
transformation : 7179251.8557908312,6022627.228704552

i need to add this code into ol-6 static image source

source: new ol.source.GeoImage(
                {   image,
                    imageCenter: transformation,
                    imageScale: scaling,
                    imageRotate: rotation,
                    //projection: pixelProjectio
                })
  • suggest or help on this.. thanks in advance.. and save my days..
0

There are 0 best solutions below