I find example to set map extent that works ok in ArcMap via ..
mxd = arcpy.mapping.MapDocument("CURRENT") .. df = arcpy.mapping.ListDataFrames(mxd) newExtent = df.extent newExtent.XMin, newExtent.YMin = newExtent.XMin+100, newExtent.YMin newExtent.XMax, newExtent.YMax = newExtent.XMax+1000.0, newExtent.YMax df.extent = newExtent arcpy.RefreshActiveView()
I would like to publish this type of tool to make it generic geoprocessing tool for WebApp Builder- it should take the given web map service and set extent of map in the web session.
It is not clear to me - whether this is possible at all? How to get web map object with python set its extent ? If I change the extend of mxd document like to code above, I have impression that all users of the service will get the changed extend, that this is not limited to that particualr web session. In Java script API there is an object Map to manipulate web map, does something like this exist in Python?
I would like to pass map service name as parameter
can pass this as a tool parameter). Is this possible at all?