I am facing issues adding any HTTPS based WMS service using ArcGIS Runtime. Strange thing is that I have to set the spatial reference to WGS84 while initializing WMS Service or else it gives error. Even though the layer status says initialized I get all properties e.g. spatialreference, extents etc as null and nothing displays in JMap
Test URL
https://hazards.fema.gov/gis/nfhl/services/public/NFHLWMS/MapServer/WMSServer?
Code Snippet
String url = "https://hazards.fema.gov/gis/nfhl/services/public/NFHLWMS/MapServer/WMSServer?";
final WmsDynamicMapServiceLayer wmsLayer = new WmsDynamicMapServiceLayer(url);
layers.add(wmsLayer);
Shows layer status ERRORED
If I change it as below
String url = "https://hazards.fema.gov/gis/nfhl/services/public/NFHLWMS/MapServer/WMSServer?";
SpatialReference crs = SpatialReference.create(SpatialReference.WKID_WGS84);
WmsDynamicMapServiceLayer wmsLayer = new WmsDynamicMapServiceLayer(url, crs);
layers.add(wmsLayer);
Shows layer status INITIALIZED
Still I am not able to view anything on the JMap. What am I missing?
NOTE :- I am using an authenticated Proxy and all HTTP urls works well.
I tried your first code snippet, and it worked nicely. Without the spatial reference.
However, I did add a basemap with a spatial reference of 4326 first.
Then added the WMS layer.
Thanks Eric. Was your test behind an Authenticated Proxy? Because we use authenticated proxy and it might be related to that?
Even though the layer initialized nothing shows up on the JMap. Where you able to view the contents of the WMS map service?