HTTPS based WMS Services support in Runtime?

4080
2
02-20-2015 02:50 AM
SachinKanaujia
Occasional Contributor III

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.

Eric Bader

Vijay Gandhi

Elise Acheson

0 Kudos
2 Replies
EricBader
Occasional Contributor III

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.

0 Kudos
SachinKanaujia
Occasional Contributor III

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?

0 Kudos