Class: Geoblacklight::KmzDownload
- Defined in:
- lib/geoblacklight/download/kmz_download.rb
Constant Summary collapse
- KMZ_DOWNLOAD_PARAMS =
{ service: 'wms', version: '1.1.0', request: 'GetMap', srsName: 'EPSG:3857', format: 'application/vnd.google-earth.kmz', width: 2000, height: 2000 }.freeze
Instance Method Summary collapse
-
#initialize(document, options = {}) ⇒ KmzDownload
constructor
A new instance of KmzDownload.
Methods inherited from Download
#create_download_file, #download_exists?, #downloadable?, #file_name, file_path, #file_path_and_name, #get, #initiate_download, #url_with_params
Constructor Details
#initialize(document, options = {}) ⇒ KmzDownload
Returns a new instance of KmzDownload.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/geoblacklight/download/kmz_download.rb', line 11 def initialize(document, = {}) bbox_wsen = document.geometry.bounding_box request_params = KMZ_DOWNLOAD_PARAMS.merge(layers: document[:layer_id_s], bbox: bbox_wsen) super(document, { type: 'kmz', extension: 'kmz', request_params: request_params, content_type: 'application/vnd.google-earth.kmz', service_type: 'wms' }.merge()) end |