add_page


Description:

public bool add_page (Texture texture, string json, double default_scale) throws Error

Adds a page to the spritesheet.

See https://maplibre.org/maplibre-gl-js-docs/style-spec/sprite/ for details about the spritesheet format. Most stylesheets provide these files along with the main style JSON.

Map styles should provide a double resolution spritesheet for high DPI displays. That spritesheet should be added as its own page, with a default_scale of 2.

Parameters:

this

a [class@VectorSpriteSheet]

texture

a [class@Gdk.Texture]

json

a JSON string

default_scale

the default scale factor of the page

Returns:

true if the page was added successfully, false otherwise