Hello, I want to ask developers conference you demonstrate the preplanned workflow, I still don't succeed, performed sw_map. Offline_areas. Create the line of code, whether can be in Storm - water folder to generate an item, but I didn't, why? The other question is, do I need to execute the Setup Map Area?
Demo address is https://www.youtube.com/watch? V = 3 q - JoOkW4Vo
There's no Setup Map Area used in video.
I'm assuming that you are using ArcGIS API for Python to create the areas. How did you create the areas and what did it report back? It looks like that it couldn't create the package for some reason. Could you share your script (if you cannot share it publically, you can send it to me directly email@example.com).
Note that you have to create the areas with the user that owns the webmap that you are targeting. Also make sure that when you access areas from the runtime application, you hook authentication manager to handle the sign in so that the task has access to the items.
Here is an example how to use the 1.4 ArcGIS API for Python to create areas based on bookmarks.
from arcgis import env
from arcgis.gis import GIS
from arcgis.mapping import WebMap
# Set verbosity level
env.verbose = True
# Setup organization and user information
portal = "https://myorganization.maps.arcgis.com"
user = "my_user"
password = "my_password"
webmap = "my_portal_itemid"
gis = GIS(portal, user, password)
# get the webmap to use offline
offline_map_item = gis.content.get(webmap)
offline_webmap = WebMap(offline_map_item)
# Cleanup and remove existing preplanned areas
print("deleting existing areas")
offline_areas = offline_webmap.offline_areas
for area in offline_areas.list():
print("deleting area: " + area.name)
# Loop through the webmap's bookmarks and try to create a map area for each one
print("creating new areas based on the bookmarks")
for bookmark in offline_webmap.definition.bookmarks:
name = bookmark.name
print("submitting jobs for: " + name)
offline_area = offline_areas.create(area=name, title=name, snippet="Snippet for area:" + name)
print("job complete for: " + name)