Class: CartoJson::Polygon
- Inherits:
-
LineString
- Object
- LineString
- CartoJson::Polygon
- Defined in:
- lib/carto_json/polygon.rb
Instance Attribute Summary
Attributes inherited from LineString
Instance Method Summary collapse
Methods inherited from LineString
Methods included from Shape
included, #initialize, #to_hash, #to_json, #to_pretty_json, #to_s, #type
Constructor Details
This class inherits a constructor from CartoJson::LineString
Instance Method Details
#to_wkt ⇒ Object
5 6 7 |
# File 'lib/carto_json/polygon.rb', line 5 def to_wkt "#{type.to_s.upcase} ((#{@points.dup.push(@points.first).collect {|p| "#{p.send(LNG)} #{p.send(LAT)}"}.join(', ')}))" end |