silvius162003

MapView with user and password in XML

Discussion created by silvius162003 on Jan 8, 2013
Latest reply on May 23, 2013 by aryasharad
Hello Everybody!

Happy new year!

I want to use an item id url to load a map with user and password. It worked if I put the code in java as follow.

map = new MapView(this, "http://www.arcgis.com/home/item.html?id=5c57ca58ba8543a7adbcf898bbd805d8", "myuser", "my password");
setContentView(map);

But i see a sample with the url put in the Xml file like this:

<!-- MapView that will fill your device screen with the "Washington, DC" hosted on ArcGIS.com. -->
<com.esri.android.map.MapView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
url="http://www.arcgis.com/home/webmap/viewer.html?webmap=e229d715f7ca4fa980308549fb288165"/>

My question is how to put user and password in xml because without them the map don't load!

Sorry for my english! I hope you understand the message!
Thanks in advance for answers!

Outcomes