Module: MapfishCoreExtensions::Array

Defined in:
lib/mapfish_core_extensions/array.rb

Instance Method Summary collapse

Instance Method Details

#to_geojson(options = {}) ⇒ Object



23
24
25
26
27
28
# File 'lib/mapfish_core_extensions/array.rb', line 23

def to_geojson(options = {})
  geojson = '{"type": "FeatureCollection", "features": ['
  geojson << collect {|e| e.to_geojson(options) }.join(',')
  geojson << ']}'
  geojson
end