Sha256: ec2bee396b9512af699d4304dafc92ecafd6dc290190391a5714d91a8a69bf34

Contents?: true

Size: 670 Bytes

Versions: 10

Compression:

Stored size: 670 Bytes

Contents

module Geoblacklight
  class KmzDownload < Geoblacklight::Download
    KMZ_DOWNLOAD_PARAMS = { service: 'wms', version: '1.1.0', request: 'GetMap', srsName: 'EPSG:900913', format: 'application/vnd.google-earth.kmz', width: 2000, height: 2000 }
    
    def initialize(document, options = {})
      request_params = KMZ_DOWNLOAD_PARAMS.merge(layers: document[:layer_id_s], bbox: document.bounding_box_as_wsen.split(' ').join(', '))
      super(document, {
        type: 'kmz',
        extension: 'kmz',
        request_params: request_params,
        content_type: 'application/vnd.google-earth.kmz',
        service_type: 'wms'
      }.merge(options))
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
geoblacklight-0.11.1 lib/geoblacklight/download/kmz_download.rb
geoblacklight-0.11.0 lib/geoblacklight/download/kmz_download.rb
geoblacklight-0.10.2 lib/geoblacklight/download/kmz_download.rb
geoblacklight-0.10.1 lib/geoblacklight/download/kmz_download.rb
geoblacklight-0.10.0 lib/geoblacklight/download/kmz_download.rb
geoblacklight-0.9.2 lib/geoblacklight/download/kmz_download.rb
geoblacklight-0.9.1 lib/geoblacklight/download/kmz_download.rb
geoblacklight-0.9.0 lib/geoblacklight/download/kmz_download.rb
geoblacklight-0.8.0 lib/geoblacklight/download/kmz_download.rb
geoblacklight-0.7.1 lib/geoblacklight/download/kmz_download.rb