Put IGN map behind a feature flag

This commit is contained in:
Paul Chavard 2020-07-30 17:10:26 +02:00
parent f1cbc9846e
commit 4c87e547b3
6 changed files with 24 additions and 16 deletions

View file

@ -1,4 +1,4 @@
- if champ.geometry?
= react_component("MapReader", { featureCollection: champ.to_feature_collection } )
= react_component("MapReader", { featureCollection: champ.to_feature_collection, ign: feature_enabled_for?(:carte_ign, champ.procedure) } )
.geo-areas
= render partial: 'shared/champs/carte/geo_areas', locals: { champ: champ, editing: false }

View file

@ -1,5 +1,5 @@
- preview = !champ.persisted?
= react_component("MapEditor", { featureCollection: champ.to_feature_collection, url: champs_carte_features_path(preview ? 'preview' : champ), preview: preview, hasCadastres: !!champ.cadastres? }, class: "carte-#{champ.id}")
= react_component("MapEditor", { featureCollection: champ.to_feature_collection, url: champs_carte_features_path(preview ? 'preview' : champ), preview: preview, hasCadastres: !!champ.cadastres?, ign: feature_enabled_for?(:carte_ign, champ.procedure) }, class: "carte-#{champ.id}")
.geo-areas
= render partial: 'shared/champs/carte/geo_areas', locals: { champ: champ, editing: true }