I expose my data as MapImage and Feature layers via Portal, and some of the users have been requesting the possibility to adjust the extent that's requested from the services.
Hence, my thought was to provide a MapTool allowing the user to define a bounding box, and restrict the services to this extent. I do have the MapTool in place but realized thereafter that there is no (easy) way to set the extent of these two MapItemTypes.
I went to the CIM, to see if the connections for any of the two layer types provide the possibility to set the extent, but again, I didn't see any possibility to do so.
Next thought was to give the extent as a parameter when establishing the layer (LayerFactory.Instance.CreateLayer()), using an Uri like this one:
https://our-maps.company.com/portal/home/item.html?id={service.Id}.
But, simply adding a &extent=minX, minY, maxX, maxY only leads to that the requested layer does not exist.
When I was trying to inspect the layer exposed through Portal, I used Python from within ArcGIS Pro, having a look at the values of the extent. One thing puzzled me a bit and that is that the extent coordinates have been returned in WGS84, even though the layers are all in UTM32N!?
Now I wonder if it is at all possible to achieve want I want to do, to restrict the extent.