can ANYONE help me in the custom print experience builder widget . print preview is not showing for my custom print select , if i change it to map only or any other like a-4 portrait it is working .
i want to have print preview for my custom print service custom template . please help me in this .
Hi @HariomPandya ,
I wonder if you selected a different wkid for the print template. Currently, the Preview print extents does not support certain wkid.
Or can you share your app with me so that I can take a look at it? My username is she10946.
Thanks,
Shengdi
Hi @ShengdiZhang , Actually when i debug the code for print widget for my custom layout the selected template is not having exportOptions{"Width","height" } also not getting maframeSize[0], and mapFrameSize[1]
Hi, the print widget calculates the printing extent based on the "webMapFrameSize" stored in the Get Layout Templates Info Task.
Please check if you have "Get Layout Template Information Task" in your print service.
Another place to check is to open the Get Layout Templates Info Task - Execute Task - Execute Task (GET), to see if the list of values contains all custom layouts::
Shengdi
Hi @ShengdiZhang , thanks for your response . i have added the get layout info task .from the arcgis pro and in arcgis pro it is showing all the values .
But in the rest sevice . what parameters should i pass to check and get the result i am confuswed in json
IT is showing this .
HI @ShengdiZhang , i am missing something . i am not getting while publishing . in the export webmap i kept webmap as json "#" and layout item as blank . please help where i am lacking .
Hi, if you want to test the Get Layout Templates Info task, you can simply click the Submit Job (GET).
If you want to test the Export Web Map, you can leave the layout template empty to use the default layout, but should not leave the web map JSON as "#".
Below is an example of a Web Map JSON for an empty map:
{"operationalLayers":[{"layerType":"ArcGISTiledMapServiceLayer","url":"https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer","id":"World_Hillshade_1081","title":"World_Hillshade","opacity":1,"minScale":0,"maxScale":0},{"type":"VectorTileLayer","styleUrl":"https://www.arcgis.com/sharing/rest/content/items/7dc6cea0b1764a1f9af2e679f642f0f5/resources/styles/root.json","id":"VectorTile_5394","title":"World Topographic Map","opacity":1,"minScale":0,"maxScale":0}],"mapOptions":{"extent":{"spatialReference":{"wkid":102100},"xmin":-18710885.945394468,"ymin":-2610763.50030847,"xmax":-2489114.0546055334,"ymax":11810763.500308469},"spatialReference":{"wkid":102100},"showAttribution":false},"exportOptions":{"dpi":96},"layoutOptions":{"titleText":"ArcGIS Web Map","customTextElements":[{"Date":"2/23/2024, 2:28:15 PM"}],"elementOverrides":{"North Arrow":{"name":"North Arrow","type":"CIMMarkerNorthArrow","visible":false}},"scaleBarOptions":{"metricUnit":"esriKilometers","metricLabel":"km","nonMetricUnit":"esriMiles","nonMetricLabel":"mi"},"legendOptions":{"operationalLayers":[]}}}
I checked . results are coming , i think i am facing issue while publishing
@ShengdiZhang , i think , i am doing mistake while publishing via arcgis pro. In the layout item id what should i pass , for both export webmap and second is get layout info task .
I have a folder inside which all the layouts are there . now i opened one layout . after that from arcgis pro .i opened the export webmap tool , provide the layout item folder wherea all layouts are there , now i publish now i used get layout info , pass the same folder it shows json with all layout properties .
now i share both tool from there . still not working ,
in the layout_iteM_id what should i pass ?
Hi, usually the Layout Item ID should be empty as this will set a default value for the layout task. If the default value is not set, passing in an empty layout item ID will return information for all layouts. However, if the default value is set, passing in an empty Layout Item ID will only return information for that layout.
Can you try setting the Layout Item ID to null in both tasks and then publishing the service again to see if that fixes the bug?
If that still doesn't solve the problem, you can send me the print service, the preview extents have a lot of parts to do with it, and without the service, it's hard to find the real problem.
Shengdi