netzmacht / contao-leaflet-maps

Leaflet maps extension for Contao CMS
12 stars 8 forks source link

Use own config system. #22

Closed dmolineus closed 9 years ago

dmolineus commented 9 years ago

We use a lot of config variables. Consider to move them into an own config.

At the moment following globals are used:

LEAFLET_MAPPERS
LEAFLET_ENCODERS
LEAFLET_LAYERS
LEAFLET_CONTROLS
LEAFLET_ICONS
LEAFLET_VECTORS
LEAFLET_STYLES
LEAFLET_TILE_PROVIDERS
LEAFLET_LIBRARIES

Each configuration should go into a config/leaflet.php or config/leaflet.json file.

return array(
    'mappers' => array(
        // ...
    ),
    'encoders' => array(
        // ...
    ),
    // ...
);

Could be implemented like the contao-bootstrap configuration subsystem. Drawback would be that removing an item from the config is not possible enymore as the arrays would be merged together.