In a web mapping application developed with ArcGIS JavaScript API (3.29) I am utilizing a WMS service describing Radar data from https://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r-t.cgi . This service offers radar information for every 5 minutes or more for many years (1995-to present). Complete URL with all the WMS service parameters is as follows https://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r-t.cgi?service=WMS&request=GetMap&transparent=true&format=image%2Fpng&bgcolor=0x000000&version=1.3.0&layers=nexrad-n0r-wmst&visibleLayers=nexrad-n0r-wmst&styles=default&bbox=-14749589.018721405%2C2415288.0507595898%2C-6844165.805357438%2C6715329.513969323&crs=EPSG%3A3857&time=2017-01-01T06%3A00%3A00.000Z&width=1616&height=879

This includes specification of time information via a parameter time with a value of time stamp in UTC. For instance the above URL is requesting time for '2017-01-01T6:00:00.000Z' (UTC time).

The WMS layer works well for the webmapping application, however when printing it via Print Task of the ArcGIS JavaScript API (A customization of Export Web Map service) I find that the custom parameter settings of WMS services (in this case timestamp) are ignored by the Print service in ArcGIS server 10.7.1. This has been documented by ESRI under limitations section here (https://enterprise.arcgis.com/en/portal/latest/use/ogc.htm)

Therefore I looked into programmatically adding the layer via ArcPY in the print geoprocessing service. I found that ArcMAP desktop 10.7.1 as well as ArcGIS PRO (2.x) support specification of custom parameters for WMS service layer manually as described in the following links (PRO- https://pro.arcgis.com/en/pro-app/help/data/services/add-wms-services.htm and desktop http://desktop.arcgis.com/en/arcmap/latest/map/working-with-arcmap/connecting-to-gis-servers.htm).

However, I would like to programmatically change a custom parameter (which would be time in my case) specified for this WMS service layer, using ArcPY to circumvent the webmap printing problem and I am unable to locate a function that will let me change it. I have already looked at layer.dataSource and layer.connectionProperties but find these to be null for a saved wms service layer. I was hoping to use updateConnectionProperties method. Has anyone encountered a similar issue, and can guide me on a solution to achieve printing via ArcMap 10.7.1 or PRO by changing the custom parameter of an existing wms layer dynamically?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.