Web Maps published with ArcGIS API for Python don't appear in Collector

980
3
Jump to solution
02-28-2018 11:13 AM
ChloeHoke
New Contributor II

I am trying to write a script that takes an existing Feature Service, adds it to a map, share the map with a group, and then the group is able to edit data in Collector app.

As far as creating the web map my code is:

wm = WebMap()
wm.add_layer(myFeatureService)
web_map_properties = {'title':'some title',
      'snippet':'Some Snippet',
      'tags':'My Tags'}
web_map_item = wm.save(item_properties=web_map_properties)

After sharing the maps and data to the group, if I log in through AGOL I can see the map, layer and make edits.  However, when I log into collector, I cannot see the map.

If I go into the web map on AGOL as the web map owner, save the map (changing nothing else), I can then see the web map in collector.  

I don't know why "saving" an additional time do anything to the collector visibility.  The web map details look identical before and after saving, so I don't see any property changes.  Could there be something to do with extent being set or something?  

Lastly, how does one set extent from a WebMap() item.

I have been referencing this guide: Publishing web maps and web scenes | ArcGIS for Developers 

Thanks, 

Nat

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

I believe Collector requires the "Collector" typeKeyword to be set on the Webmap Item. To use the map offline, the "Offline" typeKeyword might also be required. Presumably, the webmap viewer has some logic that determines which typeKeywords are set.

This is what I see using your script:

typeKeywords:["ArcGIS Online", "Explorer Web Map", "Map", "Online Map", "Web Map"]

This is what is present after saving the webmap with a layer than is editable and sync enabled.

typeKeywords:["ArcGIS Online", "Collector", "Data Editing", "Explorer Web Map", "Map", "Offline", "Online Map",…]

View solution in original post

0 Kudos
3 Replies
RobertBorchert
Frequent Contributor III

You would be better off simply publishing a service and then going to your content and creating a Web Map with your services in it and then share it.

0 Kudos
by Anonymous User
Not applicable

I believe Collector requires the "Collector" typeKeyword to be set on the Webmap Item. To use the map offline, the "Offline" typeKeyword might also be required. Presumably, the webmap viewer has some logic that determines which typeKeywords are set.

This is what I see using your script:

typeKeywords:["ArcGIS Online", "Explorer Web Map", "Map", "Online Map", "Web Map"]

This is what is present after saving the webmap with a layer than is editable and sync enabled.

typeKeywords:["ArcGIS Online", "Collector", "Data Editing", "Explorer Web Map", "Map", "Offline", "Online Map",…]
0 Kudos
ChloeHoke
New Contributor II

Awesome!  I wasn't going to ever find that on my own.  

Like you suggested, I simply added the typKeywords property to the saved web map

wm = WebMap()
wm.add_layer(myFeatureService)
web_map_properties = {'title':'some title',
      'snippet':'Some Snippet',
      'tags':'My Tags',
      'typeKeywords': ['Collector', 'Offline']}

web_map_item = wm.save(item_properties=web_map_properties)

0 Kudos