We would like to allow for different colored pins in maps.
This could be done by adding more pin sets to the extension directly, but I'm thinking that it would be nice to allow the map maker to define new pin art somehow.
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
Not all of this has to be defined -- e.g. we could JUST make the iconURL + shadowURL configurable.
Here are some implementation paths:
Extension configuration
We could allow the developer / site administrator to define custom icon values through a WordPress config variable. This means that custom icons would be defined "globally" across the entire wiki, and could be used by any table.
One downside of this approach is that adding new pin types becomes a developer task / it would need to be done server side. It would result in site-wide consistency and give control to the sysadmin, but would limit the ability of the end user to customize their maps.
As a table parameter (Wikitext)
We could have the end user define custom icons by passing a json string through HTML attribute when defining a given map. One negative of this approach is that json strings are not particularly legible.
As column parameters (WikiText)
We could have the end user define these fields at the column level, so each non-default pin would require a full icon configuration. This would result in a lot of repetition.
As a separate table (WikiText).
The end user could define custom icons by creating a specially tagged / ID'd table in wikitext (e.g. with the class 'simpleMapsIcons') where each column held a particular config value.
This would be the most legible and configurable by end users, but I don't imagine use of separate "configuration tables" is a standard MediaWiki extension concept, so this might not be intuitive.
I chatted with @frankduncan about this and the rule of thumb of server vs wiki config is "should the sysadmin be the person responsible or not":
If SimpleMaps were on fandom.com, would this configuration be something that needs to be in the fandom control interface, or something on the wiki. I think for this one, it would be the latter.
So I'm going to go with one of the WikiText approaches! I could have a global wiki config page, but think that it makes more sense (for now) for pins to be defined alongside a given map as opposed to globally. I'm leaning towards having a separate local config table that can be defined on the same page as a simplemap, but that may change as I implement it.