Class: MapPolygon
Overview
A polygon to draw and fill on the map. Has the same properties as a path with the addition of a fill color. The points do not need to form a closed loop, the last point will automatically be joined the first point
Instance Attribute Summary collapse
-
#fillcolor ⇒ Object
Color to fill in, either as a 24-bit (example: color=0xFFFFCC), a 32-bit hexadecimal value (example: color=0xFFFFCCFF), or from the set brown, green, purple, yellow, blue, gray, orange, red, white When a 32-bit hex value is specified, the last two characters specify the 8-bit alpha transparency value.
Attributes inherited from MapPath
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ MapPolygon
constructor
A new instance of MapPolygon.
Methods inherited from MapPath
Constructor Details
#initialize(attrs = {}) ⇒ MapPolygon
Returns a new instance of MapPolygon.
324 325 326 327 |
# File 'lib/googlestaticmap.rb', line 324 def initialize(attrs={}) @points = [] attrs.each {|k,v| self.send("#{k}=".to_sym,v)} end |
Instance Attribute Details
#fillcolor ⇒ Object
Color to fill in, either as a 24-bit (example: color=0xFFFFCC), a 32-bit hexadecimal value (example: color=0xFFFFCCFF), or from the set brown, green, purple, yellow, blue, gray, orange, red, white When a 32-bit hex value is specified, the last two characters specify the 8-bit alpha transparency value. This value varies between 00 (completely transparent) and FF (completely opaque).
322 323 324 |
# File 'lib/googlestaticmap.rb', line 322 def fillcolor @fillcolor end |