Styling Tilesets
One of the most important aspects of rendering your data is control over how it's presented. Styling for Tilesets is limited as they're an optimized way to render large amounts of data, but there are still some options available.
Within this article we'll cover how to manage Styles for Tileset Menu Items.
Style records
The most commonly used process is setting up a Style through our Operator app then pointing your Menu Item at the record's ID.
Tilesets are collections of Entities which may be different types. The Menu Item will let you map Entity Types to Styles, and you can also set a default Style for the Tileset as a whole.
Warning, it is highly recommended to avoid Styles that require attributes for your Tileset as a whole as it will require larger amounts of data to be downloaded and processed. It's best to get as specific as you can with the Entity Type mapping.
If you'd like to let the user pick a Style from what is available. You can request the information like so:
Programmatic Styles
We of course allow you to avoid having to deal with Style records and define your own programmatically.
We will cover the Style syntax in a separate article. Below is an example of how to use it.
Please note that the current version only lets you write programmatic Styles per-Entity-Type rather than the Tileset as a whole.
If you'd like re-render your Entity in the scene so the Style is refreshed, read through the Entity Interaction documentation.
Changing Styles
Recently we've added the ability to change what Styles are enabled within a Menu Item. That way if your setup is user driven you don't have to re-enable the Menu Item to update your Entities.
Below is a simple example where we change the Style of a Menu Item after it's been created.
If you'd like re-render your Entity in the scene so the Style is refreshed, read through the Entity Interaction documentation.