GetStyleDescriptor
Source:
src/AWS/GeoMaps/GetStyleDescriptor.ts
Runtime binding for geo-maps:GetStyleDescriptor — fetch the MapLibre
style descriptor (JSON) for a map style, optionally customized with
political view, terrain, traffic, and building options.
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:GetStyleDescriptor. Requests and responses are raw distilled
types; the descriptor payload is returned as Blob (Uint8Array of JSON).
Fetching Style Descriptors
Section titled “Fetching Style Descriptors”Provide the GetStyleDescriptorHttp implementation layer on the Function
effect (.pipe(Effect.provide(AWS.GeoMaps.GetStyleDescriptorHttp))), bind
in the init phase, then call the client at runtime.
// initconst getStyleDescriptor = yield* AWS.GeoMaps.GetStyleDescriptor();
// runtime — Style is one of "Standard" | "Monochrome" | "Hybrid" | "Satellite"const descriptor = yield* getStyleDescriptor({ Style: "Standard" });const json = new TextDecoder().decode(descriptor.Blob); // MapLibre style JSON