Module: Workbench::SimpleMapHelper

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

Instance Method Summary (collapse)

Instance Method Details

- (Object) simple_map(map_objects, map_center = nil, border_string = '')

calculation

Parameters:

  • map_objects (Objects)

    an array of objects which know how to GeoJSON themselves

  • map_center (String) (defaults to: nil)

    String of the form 'xx (f.ff f.ff)' to use as an over-ride of the maps.js center

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

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



7
8
9
10
# File 'app/helpers/workbench/simple_map_helper.rb', line 7

def simple_map(map_objects, map_center = nil, border_string = '')
  render(partial: 'layouts/map_header')
  simple_map_component(map_objects, map_center, border_string)
end

- (Object) simple_map_component(map_objects, map_center = nil, border_string = '')



12
13
14
15
16
17
# File 'app/helpers/workbench/simple_map_helper.rb', line 12

def simple_map_component(map_objects, map_center = nil, border_string = '')
  render(partial: 'shared/data/gis/simple_map',
         locals:  {map_objects:   map_objects,
                   map_center:    map_center,
                   border_string: border_string})
end