question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to view Web Map in collector gallery after adding map via API

See original GitHub issue

The code I wrote to create copies of the existing map, successfully creates new copies which I can see in My Contents tab in ArcGIS Online. However, I am unable to view those in the Collector App Map Gallery (Collector v10.3.5 running on iOS) Would anyone have a clue why? Something I am missing in the json?

If I manually “Save As” using the same title format as in the script, within the web map viewer, the map is visible in the Map Gallery of Collector app. So its the script copy process that is wrong I think.

webmap = gis.content.search(query = 'title:PC_Test', item_type=None, sort_field='numViews', sort_order='desc', max_items=9999)

testmap = webmap[0]

web_map_dict = testmap.get_data(try_json=True)

x = 0
while x <= 5:
    title = "PC_Test_" + str(x)
    web_map_properties = {'title': title,
                         'type':'Web Map',
                         'snippet':'This web map copied from template',
                         'tags':'ArcGIS Python API PC Test',
                         'text':json.dumps(web_map_dict)}

    web_map_item = `gis.content.add(web_map_properties)`

    x += 1

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
AtmaManicommented, Dec 2, 2016

@SergStol the TypeKeywords are not part of webmap JSON, instead its a property on the webmap item. When you are publishing a new webmap for using with collector app, you can write the code as following

web_map_properties = {'title': 'New Web Map for Collector',
                                  'type': 'Web Map',
                                  'snippet': 'an appropriate description',
                                  'tags': 'appropriate tags',
                                  'typeKeywords' : "Collector, Explorer Web Map, Web Map, Map, Online Map",
                                  'text': json.dumps(your_web_map_dict)}
#Publish
web_map_item = gis.content.add(web_map_properties)
1reaction
MikeMillerGIScommented, Dec 2, 2016

There is a typekeyword collector is expecting, did you copy all these over too?

From: SergStol [mailto:notifications@github.com] Sent: Friday, December 2, 2016 8:55 AM To: Esri/arcgis-python-api arcgis-python-api@noreply.github.com Subject: [Esri/arcgis-python-api] Unable to view Web Map in collector gallery after adding map via API (#42)

The code I wrote to create copies of the existing map, successfully creates new copies which I can see in My Contents tab in ArcGIS Online. However, I am unable to view those in the Collectory Gallery. Would anyone have a clue why? Something I am missing in the json?

webmap = gis.content.search(query = ‘title:PC_Test’, item_type=None, sort_field=‘numViews’, sort_order=‘desc’, max_items=9999)

testmap = webmap[0]

web_map_dict = testmap.get_data(try_json=True)

x = 0

while x <= 5:

title = "PC_Test_" + str(x)

web_map_properties = {'title': title,

                     'type':'Web Map',

                     'snippet':'This web map copied from template',

                     'tags':'ArcGIS Python API PC Test',

                     'text':json.dumps(web_map_dict)}



web_map_item = `gis.content.add(web_map_properties)`

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Esri_arcgis-2Dpython-2Dapi_issues_42&d=DgMCaQ&c=n6-cguzQvX_tUIrZOS_4Og&r=hoBw6CQuytVR65zzd5i-Zw&m=APsUWM8QVpnikUcB7OFrwYXniu-Ul4OJnkj_UYQqBhI&s=eiHnPviCYdYsYqb0uMPizcV12kHFnCgl_f-XElD05So&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AClPVVwFq1vRiiYy6-5F08DFwn-5FnVgSRVzks5rECM-2DgaJpZM4LCkvU&d=DgMCaQ&c=n6-cguzQvX_tUIrZOS_4Og&r=hoBw6CQuytVR65zzd5i-Zw&m=APsUWM8QVpnikUcB7OFrwYXniu-Ul4OJnkj_UYQqBhI&s=HbKrmKoJjNbEncxbWcAD3uvIpEqmRK_jWcmTL9BLBik&e=.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem: Unable to view a web map in Collector for ArcGIS
When attempting to access a web map in Collector for ArcGIS, the web map is not available to open, preventing users from viewing...
Read more >
Cannot See a Web Map on ArcGIS Collector
I have created a web map and it appears that all settings and permissions should allow me to see it. While I have...
Read more >
Troubleshooting—Collector for ArcGIS (Classic)
Your data collectors must have access to your map and the data it contains to use it in Collector. Make sure your data...
Read more >
Google Maps Platform FAQ
How do I start using the APIs on my site? See the Overview, Developer, and Get Started guides for the specific API or...
Read more >
Introduction to ArcGIS Field Maps - YouTube
ArcGIS Field Maps is a new mobile app that brings together map viewing, data collection, asset inspection, and location tracking workflows ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found