Select to view content in your preferred language

Python API to automate the creation of tile service from feature service

585
0
07-03-2020 05:52 AM
DavidKerr
New Contributor

Hi

I have around 750 global feature services in my ArcGIS online account. I would like to create a tile service for each one using the ArcGIS API for Python. I would like to replicate the process of creating Tile Services in the Online interface, with the "Automatically create tiles" option selected.

I have attempted as follows:

for f in feature_services: #List of items returned from gis.content.search() query

   f.create_tile_service(f'{f.name}_tiles', min_scale=20000000.00,    max_scale=50000, build_cache=False)

But get the following RuntimeError:

RuntimeError: Unable to update this service at this time since for the specified level(s) there is another job which is in either submitted or processing state. (Error Code: 400)

The function seems to create a tile service, which generates tiles at the highest zoom levels, but when zooming out, there are no tiles. Also, in the "Settings" tab of the tile service, there is nothing to indicate that tiles are being created automatically as and when the client pans around the map.

Could anyone please suggest any thing that could help me publish hundreds of tile services from feature services without having to do it manually?

Thanks 

0 Kudos
0 Replies