class Geoq::FeatureCollection

Attributes

entities[R]

Public Class Methods

new(entities) click to toggle source
# File lib/geoq/entity.rb, line 88
def initialize(entities)
  @entities = entities
end

Public Instance Methods

to_geojson() click to toggle source
# File lib/geoq/entity.rb, line 92
def to_geojson
  {type: "FeatureCollection",
   features: entities.map { |e| e.as_geojson(true) } }.to_json
end