Skip to content
HALOWERK

Mobility, Warnings and Local Data

web mercator fit to canvas

Web Mercator viewport fitting returns metres per pixel and unused horizontal or vertical canvas space. Use it when an agent needs a rectangular map fitted without cropping.

POST https://ort.halowerk.com/v1/web-mercator-fit-to-canvas

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
westnumberYes
eastnumberYes
southnumberYes
northnumberYes
width_pxintegerYes
height_pxintegerYes
Show full input schema
{
  "type": "object",
  "properties": {
    "west": {
      "type": "number",
      "minimum": -180,
      "maximum": 180
    },
    "east": {
      "type": "number",
      "minimum": -180,
      "maximum": 180
    },
    "south": {
      "type": "number",
      "minimum": -90,
      "maximum": 90
    },
    "north": {
      "type": "number",
      "minimum": -90,
      "maximum": 90
    },
    "width_px": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20000
    },
    "height_px": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20000
    }
  },
  "required": [
    "west",
    "east",
    "south",
    "north",
    "width_px",
    "height_px"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "west": 13.1,
  "east": 13.7,
  "south": 52.3,
  "north": 52.7,
  "width_px": 800,
  "height_px": 600
}

Result & documentation

Show published result schema
{
  "type": "object",
  "required": [
    "measured_at",
    "source",
    "data",
    "limitations"
  ],
  "properties": {
    "measured_at": {
      "type": "string"
    },
    "source": {
      "type": "object",
      "required": [
        "reference",
        "retrieved_at"
      ],
      "properties": {
        "reference": {
          "type": "string"
        },
        "retrieved_at": {
          "type": "string"
        }
      }
    },
    "data": {
      "type": "object",
      "properties": {
        "metres_per_pixel": {
          "type": "number"
        },
        "padding_x_px": {
          "type": "number"
        },
        "padding_y_px": {
          "type": "number"
        }
      },
      "required": [
        "metres_per_pixel",
        "padding_x_px",
        "padding_y_px"
      ]
    },
    "limitations": {
      "type": "string"
    }
  }
}

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-20 UTC.

More endpoints in this hub

All endpoints in this hub โ†’