Function format
Parameters
- style: any
a MapLibre Style
Optionalspace: numberspace argument to pass to
JSON.stringify
Returns string
stringified formatted JSON
- style: any
Was this helpful?
a MapLibre Style
Optionalspace: numberspace argument to pass to JSON.stringify
stringified formatted JSON
Format a MapLibre Style. Returns a stringified style with its keys sorted in the same order as the reference style.
The optional
spaceargument is passed toJSON.stringifyto generate formatted output.If
spaceis unspecified, a default of2spaces will be used.