Hi I 've created WebMap and sheared it to Group with Python API . all went well and I can view it and edit it in ArcGis Online but the map is missing from collector. only after I open the map in ArcGis Online and Save it from there I could see it in the collector.
I have exported the JSON files for before and after the change, and notice there are some differences.
Maybe the code for new WebMap is missing something.
this is the code I used to create the WebMap:
<SPAN class="comment token">#create webmap in AGOL and add the Layers and save</SPAN>
Survey_Webmap <SPAN class="operator token">=</SPAN> WebMap<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
SurLyr<SPAN class="operator token">=</SPAN>gisCon<SPAN class="punctuation token">.</SPAN>content<SPAN class="punctuation token">.</SPAN>get<SPAN class="punctuation token">(</SPAN>known_item_id<SPAN class="punctuation token">)</SPAN>
Survey_Webmap<SPAN class="punctuation token">.</SPAN>add_layer <SPAN class="punctuation token">(</SPAN>SurLyr<SPAN class="punctuation token">)</SPAN>
webmap_item_properties <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">{</SPAN><SPAN class="string token">'title'</SPAN><SPAN class="punctuation token">:</SPAN>SurTitle<SPAN class="operator token">+</SPAN><SPAN class="string token">"_WM"</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">'tags'</SPAN><SPAN class="punctuation token">:</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="string token">'Surveys'</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">'snippet'</SPAN><SPAN class="punctuation token">:</SPAN><SPAN class="string token">'Survey of Israel'</SPAN><SPAN class="operator token">+</SPAN>surv_id<SPAN class="punctuation token">}</SPAN>
<SPAN class="comment token">#search for the created webmap item id</SPAN>
Survey_Webmap<SPAN class="punctuation token">.</SPAN>save<SPAN class="punctuation token">(</SPAN>item_properties<SPAN class="operator token">=</SPAN>webmap_item_properties<SPAN class="punctuation token">,</SPAN>folder<SPAN class="operator token">=</SPAN> myFolder<SPAN class="punctuation token">)</SPAN>
search_result_SurWebMap <SPAN class="operator token">=</SPAN> gisCon<SPAN class="punctuation token">.</SPAN>content<SPAN class="punctuation token">.</SPAN>search<SPAN class="punctuation token">(</SPAN>query<SPAN class="operator token">=</SPAN>SurTitle<SPAN class="operator token">+</SPAN><SPAN class="string token">"_WM"</SPAN><SPAN class="punctuation token">,</SPAN> outside_org<SPAN class="operator token">=</SPAN><SPAN class="token boolean">False</SPAN><SPAN class="punctuation token">)</SPAN>
first_item <SPAN class="operator token">=</SPAN> search_result_SurWebMap<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN>
known_WebMapitem_id <SPAN class="operator token">=</SPAN> first_item<SPAN class="punctuation token">.</SPAN>id
<SPAN class="keyword token">print</SPAN><SPAN class="punctuation token">(</SPAN>known_WebMapitem_id<SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">try</SPAN><SPAN class="punctuation token">:</SPAN>
first_item<SPAN class="punctuation token">.</SPAN>share<SPAN class="punctuation token">(</SPAN>org<SPAN class="operator token">=</SPAN><SPAN class="token boolean">False</SPAN><SPAN class="punctuation token">,</SPAN>groups<SPAN class="operator token">=</SPAN>SurveyGrp<SPAN class="punctuation token">,</SPAN>everyone<SPAN class="operator token">=</SPAN><SPAN class="token boolean">False</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">print</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"Successfully shared item group"</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">except</SPAN> Exception <SPAN class="keyword token">as</SPAN> err<SPAN class="punctuation token">:</SPAN>
<SPAN class="keyword token">print</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"Something went wrong..."</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">print</SPAN><SPAN class="punctuation token">(</SPAN>str<SPAN class="punctuation token">(</SPAN>err<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN> I'm attaching the Json Files and 2 images that shows the differences.
can anyone help me on this ?