laptop and a wrench

不具合

arcpy.mapping.ConvertWebMapToMapDocument outputs do not respect the outputSize parameters in input web map as JavaScript Object Notation (JSON).

最後に公開された状態: March 27, 2020 ArcGIS for Desktop
不具合 ID 番号 BUG-000128565
送信されましたFebruary 11, 2020
最終更新日June 5, 2024
適用対象ArcGIS for Desktop
見つかったバージョン10.7.1
オペレーティング システムWindows OS
オペレーティング システムのバージョン10.0
ステータスNon-Reproducible

参考情報

There is a crucial step missing in the script. The user needs to export the data frame and use the height or width from the JSON.

対処法

The script below is the suggested workaround:

 

Web_Map_as_JSON ='{"mapOptions":{"showAttribution":false,"extent":{"xmin":-9820027.799823487,"ymin":5124163.810494072,"xmax":-9805915.613476356,"ymax":5132065.4882930415,"spatialReference":{"wkid":102100,"latestWkid":3857}},"spatialReference":{"wkid":102100,"latestWkid":3857},"scale":36111.909643},"operationalLayers":[{"id":"World_Hillshade_3805","title":"World_Hillshade_3805","opacity":1,"minScale":0,"maxScale":0,"url":"https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{"id":"VectorTile_2333","title":"VectorTile_2333","opacity":1,"minScale":0,"maxScale":0,"type":"VectorTileLayer","styleUrl":"https://cdn.arcgis.com/sharing/rest/content/items/7dc6cea0b1764a1f9af2e679f642f0f5/resources/styles/root.json"},{"id":"Water_Network_9947","title":"Water_Network_9947","opacity":1,"minScale":0,"maxScale":0,"url":"https://sampleserver6.arcgisonline.com/arcgis/rest/services/Water_Network/MapServer","visibleLayers":[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,21,22,23]}],"exportOptions":{"outputSize":[500,500],"dpi":300}}'

result = arcpy.mapping.ConvertWebMapToMapDocument(Web_Map_as_JSON)

mxd = result.mapDocument

 

df = arcpy.mapping.ListDataFrames(mxd)[0]

arcpy.mapping.ExportToPDF(mxd, r"C:\temp\output.pdf", df, result.outputSizeWidth, result.outputSizeHeight)

再現の手順

不具合 ID: BUG-000128565

ソフトウェア:

  • ArcGIS for Desktop

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

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

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

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

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

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

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