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( = {}) geojson = '{"type": "FeatureCollection", "features": [' geojson << collect {|e| e.to_geojson() }.join(',') geojson << ']}' geojson end |