Migrate the map editor to mapbox-gl with react component
This commit is contained in:
parent
92edbd1724
commit
9aea1fffee
17 changed files with 5424 additions and 19 deletions
|
@ -1,11 +1,13 @@
|
|||
.toolbar
|
||||
%button.button.primary.new-area Ajouter une zone
|
||||
%select.select2.adresse{ data: { address: true }, placeholder: 'Saisissez une adresse ou positionner la carte' }
|
||||
|
||||
.carte.edit{ data: { geo: geo_data(champ) }, class: "carte-#{form.index}" }
|
||||
|
||||
- if feature_enabled?(:new_map_editor)
|
||||
= react_component("MapEditor", { featureCollection: champ.to_feature_collection }, class: "carte-#{form.index}")
|
||||
- else
|
||||
.toolbar
|
||||
%button.button.primary.new-area Ajouter une zone
|
||||
%select.select2.adresse{ data: { address: true }, placeholder: 'Saisissez une adresse ou positionner la carte' }
|
||||
.carte.edit{ data: { geo: geo_data(champ) }, class: "carte-#{form.index}" }
|
||||
.geo-areas
|
||||
= render partial: 'shared/champs/carte/geo_areas', locals: { champ: champ, error: false }
|
||||
|
||||
= form.hidden_field :value,
|
||||
data: { remote: true, url: champs_carte_path(form.index), params: champ_carte_params(champ).to_query, method: 'post' }
|
||||
data: { remote: true, feature_collection_id: champ.type_de_champ.stable_id, url: champs_carte_path(form.index), params: champ_carte_params(champ).to_query, method: 'post' }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue