Module: Workbench::DrawableMapHelper

Defined in:
app/helpers/workbench/drawable_map_helper.rb

Instance Method Summary collapse

Instance Method Details

#drawable_map(map_objects, border_string = '', drawing_modes = 'active: polygon, marker, circle, polygon, polyline, rectangle') ⇒ Object

Parameters:

  • map_objects (Objects)

    an array of objects which know how to GeoJSON themselves

  • border_string (String) (defaults to: '')

    set to ‘border=“1”’ if the table should have borders



5
6
7
8
# File 'app/helpers/workbench/drawable_map_helper.rb', line 5

def drawable_map(map_objects, border_string = '', drawing_modes = 'active: polygon, marker, circle, polygon, polyline, rectangle')
  render(partial: 'layouts/map_header')
  drawable_map_component(map_objects, border_string, drawing_modes)
end

#drawable_map_component(map_objects, border_string = '', drawing_modes = 'active: polygon, marker, circle, polygon, polyline, rectangle') ⇒ Object



10
11
12
13
14
15
# File 'app/helpers/workbench/drawable_map_helper.rb', line 10

def drawable_map_component(map_objects, border_string = '', drawing_modes = 'active: polygon, marker, circle, polygon, polyline, rectangle')
  render(partial: 'shared/data/gis/drawable_map',
         locals: {map_objects: map_objects,
                  border_string: border_string,
                  drawing_modes: drawing_modes})
end