Skip to content

Map.getGlyphs(), setGlyphs() should allow unset glyphs #6902

@1ec5

Description

@1ec5

The type of Map.getGlyphs() should indicate that it may return null in some situations. setGlyphs() should accept something falsy in order to unset glyphs.

Currently, if the stylesheet initially has glyphs unset, getGlyphs() correctly returns null, but the TypeScript signature for this method says it can only return a nonnull string. setGlyphs() requires the first parameter to be a string containing {fontstack} and {range} tokens. The style specification has always allowed glyphs to be unset if the style lacks any symbol layer that specifies text-field. As of maplibre/maplibre-style-spec#1068, glyphs can also be unset otherwise.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions