Module: Workbench::SimpleMapHelper

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

Instance Method Summary collapse

Instance Method Details

#simple_map(map_objects, map_center = nil, border_string = '') ⇒ Object

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
# File 'app/helpers/workbench/simple_map_helper.rb', line 7

def simple_map(map_objects, map_center = nil, border_string = '')
  simple_map_component(map_objects, map_center, border_string)
end

#simple_map_component(map_objects, map_center = nil, border_string = '') ⇒ Object



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

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