Sha256: 78f47fc9d5125f4c04fadc878ea34a6a8497521a8b826d3bbe13a67d7c8c52ed

Contents?: true

Size: 609 Bytes

Versions: 12

Compression:

Stored size: 609 Bytes

Contents

module Geoblacklight
  class GeojsonDownload < Geoblacklight::Download
    GEOJSON_DOWNLOAD_PARAMS = {
      service: 'wfs',
      version: '2.0.0',
      request: 'GetFeature',
      srsName: 'EPSG:4326',
      outputformat: 'application/json'
    }

    def initialize(document, options = {})
      request_params = GEOJSON_DOWNLOAD_PARAMS.merge(typeName: document[:layer_id_s])
      super(document, {
        type: 'geojson',
        extension: 'json',
        request_params: request_params,
        content_type: 'application/json',
        service_type: 'wfs'
      }.merge(options))
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

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