diff --git a/style.ts b/style.ts index af8179abc..ef44379d7 100644 --- a/style.ts +++ b/style.ts @@ -380,6 +380,28 @@ export interface TextSymbolizer extends BasePointSymbolizer { fontWeight?: Expression<'normal' | 'bold'>; } +/** + * Configuration for a sprite image. + */ +export type Sprite = { + /** + * A path/URL to the sprite image file. + */ + source: Expression; + /** + * The starting position of the sprite to cut out. Origing [0, 0] is top left. + */ + position: [Expression, Expression]; + /** + * The width of the sprite. + */ + width: Expression; + /** + * The height of the sprite. + */ + height: Expression; +}; + /** * An IconSymbolizer describes the style representation of POINT data if styled * with a specific icon. @@ -423,7 +445,7 @@ export interface IconSymbolizer extends BasePointSymbolizer { /** * A path/URL to the icon image file. */ - image?: Expression; + image?: Expression | Sprite; /** * An optional configuration for the image format as MIME type. * This might be needed if the image(path) has no filending specified. e.g. http://myserver/getImage