class Mapbox::Overlay::Path

Path class

Public Instance Methods

arguments_check() click to toggle source
# File lib/mapbox/overlay/path.rb, line 5
def arguments_check
  fail ArgumentError, ':polyline not found' if @polyline.nil?
end
generate_overlay() click to toggle source
# File lib/mapbox/overlay/path.rb, line 9
def generate_overlay
  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