Class: GeoRuby::SimpleFeatures::LineString

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

Instance Method Summary collapse

Instance Method Details

#as_json(options = nil) ⇒ Object



67
68
69
70
71
# File 'lib/geojson.rb', line 67

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