laptop and a wrench

不具合

The overwrite parameter in the plan_route function does not work in ArcGIS Notebooks for ArcGIS Online.

ArcGIS Online
不具合 ID 番号 BUG-000152935
送信されましたOctober 12, 2022
最終更新日June 5, 2024
適用対象ArcGIS Online
見つかったバージョンN/A
オペレーティング システムWindows OS
オペレーティング システムのバージョン10.0 64 Bit
ステータスAs Designed

参考情報

It does not seem like a bug, but there may be a specific way to use this functionality that may not be clear based on Esri documentation. If the feature service already exists, the output_name argument when using context={"overwrite":True} must reference a layer in the feature service, not the feature service itself. It would be a good to idea to check whether the service already exists before using overwrite.

対処法

Use the following code:

from arcgis.gis import GIS from arcgis import features import datetime gis = GIS("https://notebooks.mapsdevext.arcgis.com", "ann_notebook", "testforann123") #Get Point Feature Layer for starting point: search_results = gis.content.search('title: Layer_start', 'Feature Layer') start = search_results[0] #Get Point Feature Layer for stops: search_results2 = gis.content.search('title: Layer_end', 'Feature Layer') stops = search_results2[0] if gis.content.is_service_name_available("test_plan_route", "feature service"): result = features.use_proximity.plan_routes(stops_layer=stops, route_count=1, max_stops_per_route=40, route_start_time=datetime.datetime(2022, 10, 12, 9, 0), start_layer = start, start_layer_route_id_field= "OBJECTID", return_to_start=True, include_route_layers=True, context= {"outSR": {"wkid": 3857}}, output_name = "test_plan_route", travel_mode="Trucking Time", stop_service_time = 5, gis=gis) else: target_plan_route = gis.content.search(f"test_plan_route AND owner:{gis.users.me.username}", "Feature Layer")[0] result = features.use_proximity.plan_routes(stops_layer=stops, route_count=1, max_stops_per_route=40, route_start_time=datetime.datetime(2022, 10, 12, 9, 0), start_layer = start, start_layer_route_id_field= "OBJECTID", return_to_start=True, include_route_layers=True, context= {"outSR": {"wkid": 3857},"overwrite": True}, output_name = target_plan_route.layers[0], travel_mode="Trucking Time", stop_service_time = 5, gis=gis)

再現の手順

不具合 ID: BUG-000152935

ソフトウェア:

  • ArcGIS Online

バグのステータスが変更されたときに通知を受け取る

Esri Support アプリのダウンロード

このトピックについてさらに調べる

ArcGIS エキスパートのサポートを受ける

テクニカル サポートへのお問い合わせ

Esri Support アプリのダウンロード

ダウンロード オプションに移動