Class: Honua::Configuration
- Inherits:
-
Object
- Object
- Honua::Configuration
- Defined in:
- lib/honua/configuration.rb
Instance Attribute Summary collapse
-
#attribution_bgcolor ⇒ Object
Returns the value of attribute attribution_bgcolor.
-
#attribution_fgcolor ⇒ Object
Returns the value of attribute attribution_fgcolor.
-
#attribution_text ⇒ Object
Returns the value of attribute attribution_text.
-
#max_fetch_attempts ⇒ Object
Returns the value of attribute max_fetch_attempts.
-
#tile_height ⇒ Object
Returns the value of attribute tile_height.
-
#tile_width ⇒ Object
Returns the value of attribute tile_width.
-
#tiles_url ⇒ Object
Returns the value of attribute tiles_url.
-
#user_agent ⇒ Object
Returns the value of attribute user_agent.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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_bgcolor ⇒ Object
Returns the value of attribute attribution_bgcolor.
5 6 7 |
# File 'lib/honua/configuration.rb', line 5 def attribution_bgcolor @attribution_bgcolor end |
#attribution_fgcolor ⇒ Object
Returns the value of attribute attribution_fgcolor.
5 6 7 |
# File 'lib/honua/configuration.rb', line 5 def attribution_fgcolor @attribution_fgcolor end |
#attribution_text ⇒ Object
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_attempts ⇒ Object
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_height ⇒ Object
Returns the value of attribute tile_height.
5 6 7 |
# File 'lib/honua/configuration.rb', line 5 def tile_height @tile_height end |
#tile_width ⇒ Object
Returns the value of attribute tile_width.
5 6 7 |
# File 'lib/honua/configuration.rb', line 5 def tile_width @tile_width end |
#tiles_url ⇒ Object
Returns the value of attribute tiles_url.
5 6 7 |
# File 'lib/honua/configuration.rb', line 5 def tiles_url @tiles_url end |
#user_agent ⇒ Object
Returns the value of attribute user_agent.
5 6 7 |
# File 'lib/honua/configuration.rb', line 5 def user_agent @user_agent end |