| 漏洞 ID 编号 |
BUG-000119506 |
| 已提交 | January 21, 2019 |
| 上次修改时间 | June 5, 2024 |
| 适用范围 | ArcGIS Pro |
| 找到的版本 | 2.2.4 |
| 操作系统 | Windows OS |
| 操作系统版本 | 2016 64 Bit |
| 状态 | Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
|
附加信息
This is user error. See http://enterprise.arcgis.com/en/server/latest/create-web-apps/windows/tutorial-publish-additional-layouts-for-printing-with-arcgis-pro.htmGo down to this bullet:- If you want to insert a custom text element, add a text element and embed the element's name in a set of open and closed curly braces, such as {parcel-id}.Curly braces are only required when you are authoring customTextElments in Pro...but the webmap_json will still have them without those braces. I.e. the user's JSON is fine. They just need to edit the text element names in Pro to have the curly braces.(I sent this info to Kory Kramer so that he can pass on the info to the user or support analyst.)
解决办法
Use a for loop in the python script to iterate through each text element in the project layout and replace (overwrite) the text string for the element based on a condition.
result = arcpy.mp.ConvertWebMapToArcGISProject(WebMap_as_JSON, layoutTemplate)
layout = result.ArcGISProject.listLayouts()[0]
for elm in layout.listElements("TEXT_ELEMENT"):
if elm.name == "CentreName":
elm.text = "c3ntr3"
if elm.name == "FloorLevel":
elm.text = "fl00r"
重现步骤