Class: GeoRuby::SimpleFeatures::MultiLineString

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

Instance Method Summary collapse

Instance Method Details

#as_json(options = nil) ⇒ Object



88
89
90
91
92
# File 'lib/geojson.rb', line 88

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