The TileJSON specification to generate the style from.
Optionaloptions: GuessStyleOptionsOptional parameters to customize the style generation.
Options for guessing the style of a map.
OptionalbaseUrl?: stringBase URL to resolve URLs for tile sources, glyphs, and sprites.
Optionalglyphs?: stringURL template for glyphs.
Optionalsprite?: SpriteSpecificationURL template for sprites. See also SpriteSpecification.
The generated style specification.
Generates a style specification based on the provided TileJSON specification and optional parameters.
This function is intentionally fault-tolerant: a TileJSON that is partially invalid never causes it to throw. Every field is validated independently and silently dropped if it does not conform, so the remaining valid fields are still used to build a valid style. Even completely invalid input (e.g.
nullor a TileJSON without usable tiles) yields a valid — if empty — style.