Class: Geoblacklight::GeojsonDownload
- Defined in:
- lib/geoblacklight/download/geojson_download.rb
Constant Summary collapse
- GEOJSON_DOWNLOAD_PARAMS =
{ service: "wfs", version: "2.0.0", request: "GetFeature", srsName: "EPSG:4326", outputformat: "application/json" }.freeze
Instance Method Summary collapse
-
#initialize(document, options = {}) ⇒ GeojsonDownload
constructor
A new instance of GeojsonDownload.
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 = {}) ⇒ GeojsonDownload
Returns a new instance of GeojsonDownload.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/geoblacklight/download/geojson_download.rb', line 13 def initialize(document, = {}) request_params = GEOJSON_DOWNLOAD_PARAMS.merge(typeName: document[Settings.FIELDS.WXS_IDENTIFIER]) super(document, { type: "geojson", extension: "json", request_params: request_params, content_type: "application/json", service_type: "wfs" }.merge()) end |