MapsplatformoperationId static
GET/v1/static
A PNG of the basemap around a point: the tiles it needs, rasterised and stitched here.
For a report, an email or anywhere a map cannot run. Part of the platform product.
Send Authorization: Bearer sk_live_…. The key's plan must include theplatform product; which plans do.
Explained in Static maps.
Example
A 600 × 400 map of the Zócalo.
curl "https://api.oslew.com/v1/static?at=19.4326%2C-99.1332&zoom=15&width=600&height=400" \
-H "Authorization: Bearer $GEO_API_KEY" \
-o map.pngfrom oslew import Client
# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")
data = client.static("19.4326,-99.1332", zoom=15, width=600, height=400)
open("map.png", "wb").write(data)import { writeFile } from "node:fs/promises";
import { Client } from "@oslew/client";
// The key is read from GEO_API_KEY.
const client = new Client({ baseUrl: "https://api.oslew.com" });
const data = await client.static_("19.4326,-99.1332", { zoom: 15, width: 600, height: 400 });
await writeFile("map.png", data);
A real response, captured from the service at commit b8f4bde-dirty.
Query
| Name | Type | Description |
|---|---|---|
atqueryrequired | string | lat,lon of the centre. |
zoomquery | number default 13 | |
widthquery | integer ≤ 2048 default 800 | |
heightquery | integer ≤ 2048 default 600 |
Responses
200 — A PNG.
image/png
binary
With RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset(and their X-RateLimit-* aliases); see rate limits.
Refusals
Every refusal is a JSON object with an error string, except where noted.
| 400 | Bad centre, or no tile archive loaded. |
| 401 | No key, or one that is unknown, revoked or suspended. |
| 403 | The key's plan does not include this route's product, or the request is larger than the plan allows. The body names the plan that does. |
| 429 | This product's bucket is empty: the key is going faster than its plan's sustained rate. Wait Retry-After seconds; nothing is used up. Carries Retry-After. |
| 503 | The pod cannot reach the control plane and its entitlements are too old to trust. Retry. |
A malformed query string or JSON body is refused by the framework before this route runs, in plain text rather than JSON; see errors.
Rendered from the OpenAPI document at commit b8f4bde-dirty; the same document is served at/v1/openapi.json and generates both clients.