Where a custom style comes from: a URL to fetch it from, or the specification itself. Exactly one.
Optional
URL to a MapLibre/Mapbox style JSON, without an API key — the SDK adds the configured one.
The complete style, as a MapLibre Style Specification object.
const fromUrl: CustomStyleSource = { url: 'https://example.com/my-custom-style.json' };const fromJson: CustomStyleSource = { json: { version: 8, sources: { ... }, layers: [ ... ] },}; Copy
const fromUrl: CustomStyleSource = { url: 'https://example.com/my-custom-style.json' };const fromJson: CustomStyleSource = { json: { version: 8, sources: { ... }, layers: [ ... ] },};
Where a custom style comes from: a URL to fetch it from, or the specification itself. Exactly one.