AnsweredAssumed Answered

setCredentials for WMSLayer

Question asked by KellyThomas on May 12, 2013
Latest reply on May 14, 2013 by KellyThomas

I am just starting to explore ArcGIS Runtime SDK for Android (10.1.1)  so please excuse me if i'm missing something really basic.

I am trying to display a layer from a WMS server. I find that if I have no credentials specified I quiet rightly receive an EsriSecurityException telling me "Invalid or missing user credentials".

Next I see that Layer has a credentials field with getCredentials, and setCredentials listed as inherited methods.  However when I attempt to call setCredentials on my WMSLayer I am informed that setCredentials is not visible!?!

What is the established technique for setting WMS credentials?

For what its worth a code snippet follows.


        mMapView = (MapView)findViewById(;                 String url = "";         WMSLayer wmsLayer = new WMSLayer(url);          UserCredentials credentials = new UserCredentials();         credentials.setUserAccount("username", "password");         wmsLayer.setCredentials(credentials); // method not visible          String [] layerNames = {"LAYER-001"};         wmsLayer.setVisibleLayer(layerNames);                  mMapView.addLayer(wmsLayer);