Class: Mapbox::Overlay::Path
Overview
Path class
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Mapbox::Overlay::Base
Instance Method Details
#arguments_check ⇒ Object
5 6 7 |
# File 'lib/mapbox/overlay/path.rb', line 5 def arguments_check fail ArgumentError, ':polyline not found' if @polyline.nil? end |
#generate_overlay ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/mapbox/overlay/path.rb', line 9 def oly = [] oly << 'path' oly << "-#{@size}" unless @size.nil? oly << "+#{@strokecolor}" unless @strokecolor.nil? oly << "-#{@strokeopacity}" unless @strokeopacity.nil? oly << "+#{@fillcolor}" unless @fillcolor.nil? oly << "-#{@fillopacity}" unless @fillopacity.nil? oly << "(#{@polyline})" oly.join end |