Open torfsen opened 7 years ago
Sounds good, you can follow the same approach as the existing map options adding a separate data-module-leaflet-options
tag. The commonLeafletMap
function already supports being passed custom Leaflet options, so just have to connect the dots :)
Currently it's impossible to change most of the Leaflet options, since they are set automatically based on the more general map options (
ckanext.spatial.common_map.*
). In my opinion, the options for Leaflet'smap
should be separately configurable both via the INI:This would require the support for a corresponding
data-module-*
attribute in the JS modules, with the additional benefit of being able to change the Leaflet map options for a specific instance of the map (for example, if you're using both the normal preview and ckanext-spatial's dataset extent map and only want to change the configuration of the latter).