ZoomTo

Node Action:

This node action zooms to a specified bounding box on the active map in ArcGIS Pro.

Parameters:

se_type

ZoomTo

se_type = ZoomTo

se_determineBoundingBox

se_typedetermineBoundingBox = "(ctx, log) => { return ctx.State.MapExtent.extent; }"

Contains code to determine which bounding box is zoomed to.

Example:

Zoom To Session Bounds: This example determines the bounds of the active session and uses that as the bounding box to zoom to on the active map.

digraph workflow {
  entry[
    se_type0 = SessionToolTrigger,
    se_displayName0 = "Zoom To Session Boundary"
    se_iconUrl0 = "https://mysubscription.blob.core.windows.net/img/extenticon.png",
    se_sortOrder0 = 100,
    se_visibilityCondition0 = "(ctx, msLogger) => {
      return true;
    }"
  ]

  getSessionBounds[
    se_type0 = Action,
    se_action0 = "(ctx, msLogger) => {  
      ctx.State.SessionBounds = new List<dynamic>(ctx.Event.assignment.bounds).Any() ? ctx.Event.assignment.bounds : ctx.Event.session.sessionBounds;
    }",
    
    se_type1 = CopyToClipboard,
    se_determineData1 = "(ctx, msLogger) => {
      return JsonConvert.SerializeObject(ctx.State.SessionBounds);
    }"
  ]

  zoomToSessionBounds[
    se_type0 = ZoomTo,
    se_determineBoundingBox0 = "(ctx, log) => {
      return JsonConvert.SerializeObject(ctx.State.SessionBounds);
    }",
  ]
  
  entry->getSessionBounds->zoomToSessionBounds->exit
}
QR Code is a registered trademark of DENSO WAVE INCORPORATED in Japan and other countries.

Was this helpful?