{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "The JSON response returned by the simplified Export Map API wrapper when responseFormat is 'json'. Contains the URL to the rendered map image, the actual dimensions and extent of the exported image (which may differ from the requested bbox if the aspect ratio of the requested size did not match the aspect ratio of the bbox), and the map scale at which the image was rendered.",
  "type": "object",
  "required": ["href", "width", "height", "extent", "scale"],
  "additionalProperties": false,
  "properties": {
    "href": {
      "type": "string",
      "format": "uri",
      "description": "The URL to the exported map image on the ArcGIS Server. This is a temporary, server-generated URL pointing to the rendered image file. The image format matches the 'format' parameter from the request (e.g. PNG, JPG). This URL is typically short-lived and should be fetched promptly — the server may clean up generated images after a period of inactivity."
    },
    "width": {
      "type": "integer",
      "minimum": 1,
      "description": "The width of the exported image in pixels. This will match the 'width' value from the request."
    },
    "height": {
      "type": "integer",
      "minimum": 1,
      "description": "The height of the exported image in pixels. This will match the 'height' value from the request."
    },
    "extent": {
      "type": "object",
      "description": "The actual geographic extent of the exported image. IMPORTANT: This may differ from the bbox provided in the request. When the aspect ratio of the requested image size (width/height) does not match the aspect ratio of the requested bbox, the server adjusts the extent to prevent the map image from appearing stretched. Client-side code should always use this returned extent — not the originally requested bbox — for any subsequent spatial calculations, coordinate transformations, or map alignment.",
      "required": ["xmin", "ymin", "xmax", "ymax", "spatialReference"],
      "additionalProperties": false,
      "properties": {
        "xmin": {
          "type": "number",
          "description": "The minimum x-coordinate (left edge) of the actual exported extent."
        },
        "ymin": {
          "type": "number",
          "description": "The minimum y-coordinate (bottom edge) of the actual exported extent."
        },
        "xmax": {
          "type": "number",
          "description": "The maximum x-coordinate (right edge) of the actual exported extent."
        },
        "ymax": {
          "type": "number",
          "description": "The maximum y-coordinate (top edge) of the actual exported extent."
        },
        "spatialReference": {
          "type": "object",
          "description": "The spatial reference of the returned extent. This will match the imageSR from the request (or bboxSR if imageSR was not specified).",
          "properties": {
            "wkid": {
              "type": "integer",
              "description": "The well-known ID of the spatial reference."
            },
            "latestWkid": {
              "type": "integer",
              "description": "The latest well-known ID, if the original WKID has been superseded."
            },
            "wkt": {
              "type": "string",
              "description": "The well-known text string defining the spatial reference, present when a custom coordinate system was used."
            }
          }
        }
      }
    },
    "scale": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "The map scale at which the image was rendered, expressed as the denominator of the scale ratio. For example, a value of 25300000 means the map scale is 1:25,300,000. This is useful for understanding the level of detail in the exported image and for scale-dependent rendering decisions."
    }
  }
}
