The problem I am having is I don't know what URL to use. Is it the same URL as the one you get when you "share" your map from the web portal?

999
1
09-23-2016 12:07 PM
aclockworkorangutan
New Contributor

Hello, I have a friend who has the ArcGIS desktop suite. He uses ArcMap to create routes with layers, etc. and somehow (I don't know much about the desktop apps) but somehow he "publishes" his map and layers to ArcGIS website.

I can login to ArcGIS.com and see the map and layers and view them right online using the dynamically created web app feature or create a presentation, etc).

[Our map online]

I am a developer using ArcGIS for android. My app creates an instance of a MapView class. The problem I am having is I don't know how to pull the data that my friend and I can view on the web. From what I have read I think I should be using the WSLayer which is a layer that lives out in some map server.

I was reading some tutorial online and here is what they said about adding layers from the web: The problem I am having is

- I don't know what URL to use. Is it the same URL as the one you get when you "share" your map from the web portal?

- Can I use the same URL as the webpage?

- According to official documentary the map must be on a Map Server, does this mean I may have to pay money to host map.

0 Kudos
1 Reply
AlexanderNohe1
Occasional Contributor III

aclockwork orangutan

The map url that you shared was secured, so first things first, you would either need to share the map publicly or would need to do some sort of authentication within your app.

Second, I am assuming that you are working with API 10.2.8 and not the quartz api.  If you look at the MapView documentation, you should see that your url should look something like the one provided in this XML declaration:

MapView | ArcGIS Android 10.2.8 API 

 <!-- 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"/>

In the URL, you would put the URL of your map which would look something similar except maybe it would start with:

"https://decotours.maps.arcgis.com/..."

Finally,

- According to official documentary the map must be on a Map Server, does this mean I may have to pay money to host map.

When you use ArcGIS Online in an organizational account like you have, you should be fine with uploading your data to ArcGIS Online and hosting it there.  ArcGIS Online will host your data in a MapServer instance (I believe).

I hope this helps!

I look forward to your response.