Skip to content

GetTile

Source: src/AWS/GeoMaps/GetTile.ts

Runtime binding for geo-maps:GetTile — fetch a single map tile addressed by tileset, zoom level, and X/Y grid coordinates.

geo-maps is a standalone, pay-per-call Amazon Location API with no resource to manage: the binding takes no arguments and grants the function geo-maps:GetTile. Requests and responses are raw distilled types; the tile payload is returned as Blob (Uint8Array).

Provide the GetTileHttp implementation layer on the Function effect (.pipe(Effect.provide(AWS.GeoMaps.GetTileHttp))), bind in the init phase, then call the client at runtime.

// init
const getTile = yield* AWS.GeoMaps.GetTile();
// runtime — Z/X/Y are string coordinates in the tile grid
const tile = yield* getTile({
Tileset: "vector.basemap",
Z: "0",
X: "0",
Y: "0",
});
const bytes = tile.Blob; // Uint8Array | undefined