I wish to overlay a transparent WMS layer onto a basemap in arcgis android. Here is my code snippet. It loads only the BaseMap but not the WMS layer, i tried on Online Arcgis and it works.
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_home, container, false);
m_MapView = (MapView) rootView.findViewById(R.id.map);
ArcGISDynamicMapServiceLayer tileLayer;
WMSLayer weatherlayer = new WMSLayer ("http://wms.openweathermap.org/service?");
tileLayer = new ArcGISDynamicMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer");
Envelope env = new Envelope(103.5, 1.52,
104.22, 1.18);
m_MapView.setExtent(env);
m_MapView.addLayer(tileLayer);
String[] layers = {"precipitation"};
weatherlayer.setVisibleLayer(layers);
weatherlayer.setOpacity(0.5f);
m_MapView.addLayer(weatherlayer);