Class: Geoblacklight::ShapefileDownload
- Defined in:
- lib/geoblacklight/download/shapefile_download.rb
Constant Summary collapse
- SHAPEFILE_DOWNLOAD_PARAMS =
{ service: 'wfs', version: '2.0.0', request: 'GetFeature', srsName: 'EPSG:4326', outputformat: 'SHAPE-ZIP' }.freeze
Instance Method Summary collapse
-
#initialize(document, options = {}) ⇒ ShapefileDownload
constructor
A new instance of ShapefileDownload.
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 = {}) ⇒ ShapefileDownload
Returns a new instance of ShapefileDownload.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/geoblacklight/download/shapefile_download.rb', line 10 def initialize(document, = {}) request_params = SHAPEFILE_DOWNLOAD_PARAMS.merge(typeName: document[:layer_id_s]) super(document, { type: 'shapefile', extension: 'zip', request_params: request_params, content_type: 'application/zip', service_type: 'wfs' }.merge()) end |