Markers based on Resource Template in Mapping Module

Hello and apologies if this has been address before,

Thank you for the latest release of the Mapping module.

I wanted to know if it would be possible to get variable marker colours (or shapes) depending on the resource template the item mapped is assigned to? So that for example if i have items which are People the markers are blue, but if I have items which are trees they are purple. Or maybe this can be chosen at the time of the mapping of the item.

I am not sure if there is a way to do this within a theme of Omeka S, or if it requires adjusting the mapping module code. Or if it might be possible as a future development kind of related to this request:


It is currently not possible to do this - at least it’s not a configurable option. I’ve added an issue, but not sure if or when we can address it.

It’ll take some technical chops, but you could customize the code for your specific purpose. You’ll need to add the resource template data to the $markers array that’s passed to the partial in \Mapping\Site\BlockLayout\Map:render(). Then, in Mapping/asset/js/mapping-block.js, you’ll need to adjust the marker’s Leaflet Icon according to the resource template when setting the markers (providing your custom iconUrl, of course).

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.