Select to view content in your preferred language

Get a map from appid

995
2
Jump to solution
10-23-2017 12:50 PM
DavidHoxeng
Emerging Contributor

So I am developing an app for a client and they have given me a set of maps that have an appid.  I don't see anyway to load a map by the appid.  What I am wondering is if there is a way I can get the map/layers/portal information from the appid, or do I need to go back to the client and ask them for something different?  

The URL they have directed me to is thiername.maps.arcgis.com/apps/MapSeries/index.html?appid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
AlexanderNohe1
Honored Contributor

You can get the webmaps contained within this web application by going to the following URL:

https://theirname.maps.arcgis.com/sharing/content/items/appid/data?f=json 

From there, you will be presented with some JSON which can be parsed to show the webmaps within. You will want to find the objects that start like this:

{"type":"webmap","webmap":{"id":"<someotherid>"...

from this, you can then use those other ids within your own application.  
These other ids will reference a portal item id that can then construct a webmap 
in the runtime.

It might be better for your user to create a group in portal and then provide that group id
to you so you they can freely update the webmaps within that group and your app can then
handle those additional groups.

I hope this helps!

View solution in original post

2 Replies
AlexanderNohe1
Honored Contributor

You can get the webmaps contained within this web application by going to the following URL:

https://theirname.maps.arcgis.com/sharing/content/items/appid/data?f=json 

From there, you will be presented with some JSON which can be parsed to show the webmaps within. You will want to find the objects that start like this:

{"type":"webmap","webmap":{"id":"<someotherid>"...

from this, you can then use those other ids within your own application.  
These other ids will reference a portal item id that can then construct a webmap 
in the runtime.

It might be better for your user to create a group in portal and then provide that group id
to you so you they can freely update the webmaps within that group and your app can then
handle those additional groups.

I hope this helps!
DavidHoxeng
Emerging Contributor

This is perfect!  Thank you for the answer!

0 Kudos