Skip to content

Add expression_type and stylesheet link support to rendering extension - #28

Open
emmanuelmathot wants to merge 3 commits into
mainfrom
fix/issue-17-21-format-vocabulary
Open

emmanuelmathot wants to merge 3 commits into
mainfrom
fix/issue-17-21-format-vocabulary

Conversation

@emmanuelmathot

Copy link
Copy Markdown
Member

Introduce expression_type for identifying expression dialects and add support for rel: "stylesheet" links to reference external style documents. Include a new vector data example demonstrating the extension's application on non-raster data. Update the changelog to reflect these additions.

fixes #17 and #21

@emmanuelmathot emmanuelmathot changed the title Add expression_type and stylesheet link support to rendering extension Add expression_type and stylesheet link support to rendering extension Sep 22, 2026
@emmanuelmathot
emmanuelmathot added this pull request to stack #30 September 22, 2026 06:49
Comment thread json-schema/schema.json
Comment on lines 285 to +290
"expression": {
"type": ["string", "object", "array"]
},
"expression_type": {
"type": "string"
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the schema should ensure that expression_type is required when expression is set and vice versa. They can't really be provided alone.

Comment thread README.md
"rel": "stylesheet",
"type": "application/vnd.mapbox.style+json",
"href": "https://example.com/styles/ndvi.json",
"render": "ndvi"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also make this usable without the render extension? So that we can just connect an asset and a style? Especially in the vector case it doesn't make a lot of sense to use render.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It actually make sense when you want to fine tune the rendering. Check the examples.
Besides that note, I do not see what prevent a user to add a stylesheet link as of today.

@m-mohr m-mohr Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like a misunderstanding.

The way it is is fine for render, but there's no way to directly make a connection between asset (or another link) and the stylesheet. For vector you may just want t a stylesheet without the render extension, as render is primarily targeting raster data.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Which "format" for expression?

2 participants