Regen-Digital / farm_regen_digital

farmOS module for Regen Digital
GNU General Public License v3.0
2 stars 1 forks source link

Access different layers in different parts of UI #10

Open paul121 opened 2 years ago

paul121 commented 2 years ago

The idea here is that not all layers need to be displayed on every page. Perhaps we only show some layers on the dashboard map, but have a dedicated page with a map that allows you to explore all of the available layers

mstenta commented 2 years ago

I achieved this with the NRCS Soil Survey layer by adding this in the behavior: https://github.com/farmOS/farm_nrcs/commit/71b6889b5d116dbacd27ec85a0e794d267325ada

And this in the farm_map_input element in a custom form/controller:

'#map_settings' => [
  'behaviors' => [
    'nrcs_soil_survey' => [
      'visible' => TRUE,
    ],
  ],
],