Guest User

Untitled

a guest
Jun 21st, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. from arcgis.gis import GIS
  2. from arcgis.gis import Item
  3. gis = GIS('Pro')
  4. itemID = 'YOU NEED TO FILL THIS OUT!!!'
  5. new_thumbnail = r"YOU NEED TO FILL THIS OUT!!!"
  6. #You can leave large thumb blank and it will add the sample thumbnail as both reg thumb and large thumb
  7. #As regular thumbnail supports larger than 200x133 now, there may not be a need for large thumbnail
  8. large_thumb = ''
  9. large_thumb= large_thumb or new_thumbnail
  10. item = Item(gis, itemID)
  11. print (f'old Largethumb: {item.largeThumbnail}')
  12. print (f'old thumb: {item.thumbnail}')
  13. item.largeThumbnail = new_thumbnail
  14. new_det = dict(largeThumbnail=large_thumb)
  15. res = item.update(item_properties=new_det,thumbnail=new_thumbnail)
  16. print (res)
  17. item = Item(gis, itemID)
  18. print (f'new Largethumb: {item.largeThumbnail}')
  19. print (f'new thumb: {item.thumbnail}')
Add Comment
Please, Sign In to add comment