Sha256: a38bdd0d56e78743677c5ec6e12a52865205f88cda924ed907867bde2b0fc319
Contents?: true
Size: 885 Bytes
Versions: 19
Compression:
Stored size: 885 Bytes
Contents
module Geoblacklight class WmsLayer def initialize(params) @params = params.to_h.merge(Settings.WMS_PARAMS) @response = Geoblacklight::FeatureInfoResponse.new(request_response) end def url @params['URL'] end def search_params @params.except('URL') end def feature_info @response.check end def request_response conn = Faraday.new(url: url) conn.get do |request| request.params = search_params request.options.timeout = Settings.TIMEOUT_WMS request.options.open_timeout = Settings.TIMEOUT_WMS end rescue Faraday::Error::ConnectionFailed => error Geoblacklight.logger.error error.inspect { error: error.inspect } rescue Faraday::Error::TimeoutError => error Geoblacklight.logger.error error.inspect { error: error.inspect } end end end
Version data entries
19 entries across 19 versions & 1 rubygems