Class: Map::GlebaTilesService
- Inherits:
-
Object
- Object
- Map::GlebaTilesService
- Defined in:
- lib/map/gleba_tiles_service.rb
Constant Summary collapse
- ZOOM_MIN =
1- ZOOM_MAX =
15- OUTPUT_DIR =
'public/map_tiles'
Instance Method Summary collapse
- #download_all_tiles ⇒ Object
- #download_service ⇒ Object
-
#initialize(gleba) ⇒ GlebaTilesService
constructor
A new instance of GlebaTilesService.
- #kml_service ⇒ Object
Constructor Details
#initialize(gleba) ⇒ GlebaTilesService
Returns a new instance of GlebaTilesService.
8 9 10 |
# File 'lib/map/gleba_tiles_service.rb', line 8 def initialize(gleba) @gleba = gleba end |
Instance Method Details
#download_all_tiles ⇒ Object
12 13 14 |
# File 'lib/map/gleba_tiles_service.rb', line 12 def download_all_tiles download_service.download end |
#download_service ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/map/gleba_tiles_service.rb', line 16 def download_service @download_service ||= Map::DownloadTilesService.new({ boundary_ne: kml_service.point_more_north_east, boundary_sw: kml_service.point_more_south_west, zoom_min: ZOOM_MIN, zoom_max: ZOOM_MAX, output_directory: OUTPUT_DIR }) end |
#kml_service ⇒ Object
26 27 28 |
# File 'lib/map/gleba_tiles_service.rb', line 26 def kml_service @kml_service ||= Map::KmlService.new(@gleba.arquivo_kml) end |