| Map upgrade 1 (todo_working) |
| Priority | 3 |
| Component | tools |
| Fixable by | admin |
Improve the map with the following features / changes:
Improve custom layer support:
Layers are very rough now. Their definition should be laid out as follows:
name: the layer name
items: multiple visual components make up this layer
renderer: the name of the renderer for this item. The renderer is an atomic function that has been registered int the map library. It is responsible for rendering the layer's SVG.
data: the data intended for this specific renderer. The exact details of the data structure are dependent upon to the renderer implementation.
[group]: an optional group name in which this item belongs. Groups should work as the current systems layer.
To allow this new structure, the renderer methods should be split into atomic component renderers, and the default system rendere will be split into two.
Renderers should be composable (i.e., one rendere must be able to invoke another) to enable reuse of renderers like the label renderer (currently embedded in the systems renderer only)
Renderers should do data checking and throw on any invalid structure.
Multiple layers could share a file (this requires further thought)
Related todos: Map foreign powers, Highlight sectors in the map