A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Esri/arcgis-python-api/issues/1889 below:

EnterpriseVectorTileLayerManager.edit() needs wrapped with a .start() .stop() for exportTiles=True to work · Issue #1889 · Esri/arcgis-python-api · GitHub

Describe the bug
I am updating a vector tile layer with arcpy.server.ReplaceWebLayer and needing to ensure exportTiles=True, for offline capabilities to persist. After updating the service definition, the service needs to be stopped before the .edit() call and then started again after. Although the service shows exportTiles=True, Field maps errors saying that exportTiles is not equal to true unless you stop and start the service after editing the service definition with .edit().

To Reproduce
Steps to reproduce the behavior:

serviceDefinition = {
            "serviceName": SERVICENAME,
            "type": "VectorTileServer",
            "description": "",
            "capabilities": "TilesOnly,Tilemap",
            "provider": "ArcObjects11",
            "clusterName": "default",
            "minInstancesPerNode": 0,
            "maxInstancesPerNode": 0,
            "instancesPerContainer": 1,
            "maxWaitTime": 60,
            "maxStartupTime": 300,
            "maxIdleTime": 1800,
            "maxUsageTime": 600,
            "loadBalancing": "ROUND_ROBIN",
            "isolationLevel": "HIGH",
            "configuredState": "STARTED",
            "recycleInterval": 24,
            "recycleStartTime": "00:00",
            "keepAliveInterval": 1800,
            "private": "false",
            "isDefault": "false",
            "maxUploadFileSize": 0,
            "allowedUploadFileTypes": "",
            "properties": {
                "outputDir": outputDir,
                "cacheDir": cacheDir,
                "maxScale": "0",
                "maxRecordCount": "1000",
                "clientCachingAllowed": "true",
                "antialiasingMode": "None",
                "textAntialiasingMode": "Force",
                "isCached": "true",
                "virtualOutputDir": "/rest/directories/arcgisoutput",
                "maxExportTilesCount": "100000",
                "exportTilesAllowed": "true",
                "maxLOD": "15",
                "minLOD": "0",
                "maxBufferCount": "100",
                "virtualCacheDir": "/rest/directories/arcgiscache",
                "minScale": "0",
            },
            "portalProperties": {
                "isHosted": "true",
                "portalItems": [{"itemID": itemid, "type": "VectorTileServer"}],
            },
            "extensions": [],
            "frameworkProperties": {},
            "datasets": [],
        }
 vector_layer_item = gis.content.get(itemid)
 vector_tile_layer = VectorTileLayer.fromitem(vector_layer_item)

vtl_manager = vector_tile_layer.manager
vtl_manager.edit(service_dictionairy=serviceDefinition)

error:
No error, everything appears successful with the code, but when you go to create an offline area in Field Maps, it tells you that exportTiles is not enabled.
Adding a .stop() before .edit() and a .start() after .edit() allows tiles to be successfully taken offline.

Expected behavior
Documentation saying that you need .edit() to be wrapped with start/stop would be nice. Or if .edit() worked alone that would also be nice.

Platform (please complete the following information):

Additional context
Earlier in the script we are updating the Vector Tile Layer using arcpy.server.ReplaceWebLayer() if that matters in replicating this issue.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4