Class: Honua::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/honua/configuration.rb', line 9

def initialize
  # max attempts to fetch a tile until given up and returning an empty tile
  @max_fetch_attempts = 3

  # OSM map tiles are typically 256x256
  # https://wiki.openstreetmap.org/wiki/Tiles
  @tile_height = 256
  @tile_width = 256

  # user agent that's used to make requests to the tile server
  @user_agent = Honua::Identity::VERSION_LABEL

  # attribution_text can contain some Pango markup
  # https://developer.gnome.org/pango/stable/pango-Markup.html
  @attribution_text = nil
  @attribution_fgcolor = '#fff'
  @attribution_bgcolor = '#000'
end

Instance Attribute Details

#attribution_bgcolorObject

Returns the value of attribute attribution_bgcolor.



5
6
7
# File 'lib/honua/configuration.rb', line 5

def attribution_bgcolor
  @attribution_bgcolor
end

#attribution_fgcolorObject

Returns the value of attribute attribution_fgcolor.



5
6
7
# File 'lib/honua/configuration.rb', line 5

def attribution_fgcolor
  @attribution_fgcolor
end

#attribution_textObject

Returns the value of attribute attribution_text.



5
6
7
# File 'lib/honua/configuration.rb', line 5

def attribution_text
  @attribution_text
end

#max_fetch_attemptsObject

Returns the value of attribute max_fetch_attempts.



5
6
7
# File 'lib/honua/configuration.rb', line 5

def max_fetch_attempts
  @max_fetch_attempts
end

#tile_heightObject

Returns the value of attribute tile_height.



5
6
7
# File 'lib/honua/configuration.rb', line 5

def tile_height
  @tile_height
end

#tile_widthObject

Returns the value of attribute tile_width.



5
6
7
# File 'lib/honua/configuration.rb', line 5

def tile_width
  @tile_width
end

#tiles_urlObject

Returns the value of attribute tiles_url.



5
6
7
# File 'lib/honua/configuration.rb', line 5

def tiles_url
  @tiles_url
end

#user_agentObject

Returns the value of attribute user_agent.



5
6
7
# File 'lib/honua/configuration.rb', line 5

def user_agent
  @user_agent
end