Hi,
I added an image by using NativeImageRasterLayer.
Code:
NativeImageRasterLayer rasterRadar = new NativeImageRasterLayer(imageURL, _proj.ConvertToExternalProjection(new RectangleShape(-127.6622, 50.4, -66.63, 21.56)));
rasterRadar.Name = "RadarLayer1";
ol_Radar.Layers.Add("RadarLayer1", rasterRadar);
I want to re-set ‘Image Extent’ of that Layer Extent. I tried this code. But not work out.
Code:
LayerOverlay ol = (LayerOverlay)wfMap.CustomOverlays[0];
NativeImageRasterLayer raster = (NativeImageRasterLayer)ol.Layers[0];
if (raster.Name == “RadarLayer1”)
{
NativeImageRasterSource image = (NativeImageRasterSource)raster.ImageSource;
// image. = _proj.ConvertToExternalProjection(new RectangleShape(-127.6622, 50.4, -66.63, 21.56));
}
In NativeImageRasterSource, NativeImageRasterSource property there for updating image but ‘Image Extent’ property not there.
I checked in Debug mode, that image extent property there in non-static members of NativeImageRasterSource.
Image:
Please check it, finally i want to update image extent to raster layer.
Thanks,
Riyaz