Skip to content

GetGlyphs

Source: src/AWS/GeoMaps/GetGlyphs.ts

Runtime binding for geo-maps:GetGlyphs — fetch a glyph (font) PBF range used to render map labels for a font stack.

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:GetGlyphs. Requests and responses are raw distilled types; the glyph payload is returned as Blob (Uint8Array).

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

// init
const getGlyphs = yield* AWS.GeoMaps.GetGlyphs();
// runtime — FontUnicodeRange is a 256-glyph PBF page like "0-255.pbf"
const glyphs = yield* getGlyphs({
FontStack: "Amazon Ember Regular",
FontUnicodeRange: "0-255.pbf",
});
const bytes = glyphs.Blob; // Uint8Array | undefined (PBF)