Preview style
preview_styleGenerate a live link to an interactive MapLibre style map served locally; it redraws when the style file changes, with no viewer page or web server to start.
Instructions
Gives the user a link to an interactive map of a style, served by this server on their machine, so there is no viewer page to write, no web server to start and no browser to open for them. Given a file, the map follows it and redraws when the file changes. Given the style as an object, the map shows a changed style when you pass it together with the link, as link. Pass the style as an object, a URL or a file path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL of a style JSON document. | |
| link | No | A link that this tool gave before for a style passed as an object. The map there then shows this style, and a page that has it open redraws. | |
| path | No | Path to a style JSON file, relative to the directory the server runs in. | |
| style | No | The style as a JSON object. |