PnX-SI / GeoNature-atlas

Application WEB permettant de générer des fiches espèces publiques à partir d'observations faune/flore
GNU General Public License v3.0
44 stars 48 forks source link

feat(map): Add mask outside territory #296

Closed mvergez closed 3 years ago

mvergez commented 3 years ago

Added the possibility to add a mask to set a shade on the outside of the study territory.

The Snogylop.js library has been used to do the job.

Warning : the leaflet.js library had to be bumped from 1.0.2 to 1.6.0 to be compatible with snogylop For now no bug has been detected in the atlas. Implemented in the atlas of the PNR de la Forêt d'Orient.

To activate the mask, you can use the following parameters in atlas/configuration/config.py:

MAP = {
  'MASK_STYLE': {
                "fill": True,
                "fillColor": '#020202',
                "fillOpacity": 0.3
                }
}

The fill parameter can be set to False (default value) to deactivate the mask.

Closes #89

corentinlange commented 3 years ago

Implemented with PR #320. Needed to be rewritten because of Bootstrap4.