GetSprites
Source:
src/AWS/GeoMaps/GetSprites.ts
Runtime binding for geo-maps:GetSprites — fetch a map style’s sprite
sheet (PNG) or sprite index (JSON) used to render map iconography.
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:GetSprites. Requests and responses are raw distilled types; the
sprite payload is returned as Blob (Uint8Array).
Fetching Sprites
Section titled “Fetching Sprites”Provide the GetSpritesHttp implementation layer on the Function effect
(.pipe(Effect.provide(AWS.GeoMaps.GetSpritesHttp))), bind in the init
phase, then call the client at runtime.
// initconst getSprites = yield* AWS.GeoMaps.GetSprites();
// runtime — FileName follows `sprites(@2x)?.(png|json)`const sprites = yield* getSprites({ FileName: "sprites.png", Style: "Standard", ColorScheme: "Light", Variant: "Default",});const bytes = sprites.Blob; // Uint8Array | undefined (PNG or JSON)