Can I apply a spatial shift to a .tif I'm loading in an ImageryLayer in arcgis jsapi?

593
0
08-27-2023 11:31 AM
NazeshKaneria
New Contributor

I'm building an interface with arcgis jsapi 4.27 which needs to be able to display multiple image layers on top of each other, and I need to programmatically shift a layer relative to the other layers (ideally, e.g. move it 10m to the south and 10m to the east -- that kind of thing).

What is the best way to do this?

I'm actually working with a large number of self-hosted cloud-optimized geotiffs (so I don't have an ICS service, but maybe I should fake one?), but I'm using this codepen as my starting point: https://codepen.io/foobarbecue/pen/poQwgpq . SO says I have to paste some code so basically it's:

const layer1 = new ImageryTileLayer({
    url: "https://ss6imagery.arcgisonline.com/imagery_sample/landsat8/Bolivia_LC08_L1TP_001069_20190719_MS.tiff"
});
const layer2 = new ImageryTileLayer({
    url: "https://ss6imagery.arcgisonline.com/imagery_sample/landsat8/Bolivia_LC08_L1TP_001069_20190719_MS.tiff"
});
const map = new Map({
    layers: [layer1, layer2]
});

I've been trying to mess with redefining the spatialReference, changing rasterinfo.nativeExtent and rasterinfo.extent properties, but I can't get it to budge.

0 Kudos
0 Replies