Class: GeoRuby::SimpleFeatures::MultiPoint

Inherits:
Object
  • Object
show all
Defined in:
lib/geojson.rb

Instance Method Summary collapse

Instance Method Details

#as_json(options = nil) ⇒ Object



81
82
83
84
85
# File 'lib/geojson.rb', line 81

def as_json(options = nil)
  coords = self.geometries.collect {|geom| [geom.x, geom.y] }
  {:type => "MultiPoint", 
    :coordinates => coords}.as_json(options)
end