Hi.
I am setting map current extent as per rasterlayer. First time its setting but if i change image and refresh it , it is not setting map current extent as per raster layer extent.
I am using below code
wfMap.CurrentExtent = ExtentHelper.GetDrawingExtent(wfMap.FindRasterLayer("Name") .GetBoundingBox(),wfMap.Width,wfMap.Height) ;
Please guide to solve it.
Thanks,
Goral
Current extent as per rasterlayer
Hi Goral,
Sorry I don’t understand what the problem you met. Do you mean that the value of wfMap.CurrentExtent is not equal to ExtentHelper.GetDrawingExtent(wfMap.FindRasterLayer(“Name”) .GetBoundingBox(),wfMap.Width,wfMap.Height) ? By default the extent will be snapped to the nearest zoom level while assigning the value and we can set the ZoomLevelSnapping property of wfMap as ZoomLevelSnappingMode.None to change the default action. Both the ZoomLevelSnappingMode.Default and the ZoomLevelSnappingMode.None will display the whole raster layer.
If something misunderstood here could you please attach a sample here?
Regards,
Peter
Hi,
I am overlaying one image on map ( raster layer) . In next step I want to set map current extent as per image boundaries (raster layer extent).
When I am trying to set map current extent it is not setting map new extent. Hope I am able to explain.
Thanks,
Goral
Hi Goral,
I am sorry I think our current extent API don’t have this issue, so it’s hard to reproduce that only from your description, so a project which can reproduce your question should be helpful.
Regards,
Don