Skip to main content

How to add custom graphics to export map api

Comments

3 comments

  • Amanda Frech

    Hi Yannick,

     

    The workflow that got demoed at the end of the video is available here:

    https://latitudegeo.maps.arcgis.com/home/item.html?id=372b530f934c4e24900ba62f55039e94

     

    The part you're interested in seems like it's mostly in the DisplayForm named "Run Report", at the end of the workflow. The text element has a load event with a subworkflow that handles the export request and generating the report. The exact request that's sent for the export is:

     

    ={ "f":"pjson", "outputFormat": "PNG", "bbox": $mapExtent2.extent.xmin + "," + $mapExtent2.extent.ymin + "," + $mapExtent2.extent.xmax + "," + $mapExtent2.extent.ymax, "layers": $exportLayers.result, "layerDefinitions": {"3":{"7":$layerDefinition.result}}, "graphics":$masterMarkup.result, "imageWidth": "900", "imageHeight": "500", "scale": 18056 }

    $masterMarkup.result comes from a Get Feature Geometry activity, so it's just a geometry object

    0
  • Permanently deleted user

    Thanks Amanda!

    I still had to search quite a bit in the example workflow, but I found what I was looking for. The $masterMarkup.result, thus the "graphics" is created as follows:

    ={"layers": [{ "elements": [{ "geometry":$getFeatureGeometry.geometry, "symbol": { "color": [255, 73, 73,100], "outline": {"color":[255, 73, 73, 255], "width": 2, "type": "esriSLS", "style": "esriSLSSolid"}, "type": "esriSFS", "style": "esriSFSSolid" } }] }] }

    Put this in a 'create value', call it 'masterMarkup', and you're there ;)

    0
  • Permanently deleted user

    I had a similar question and the person doing that video demo (Patrick Fingler of Latitude) also pointed me to this post titled 'Parameters example for using the REST export map

    ' https://support.geocortex.com/essentialsGSCForum?sub-nav=forum&main-nav=essentials&#!/feedtype=SINGLE_QUESTION_DETAIL&criteria=ALLQUESTIONS&id=90660000000CkAPAA0 for more info on this. You do need to first log in with a Geocortex support account to see that link.

    0

Please sign in to leave a comment.