Class: Geoblacklight::Configuration
- Inherits:
-
Object
- Object
- Geoblacklight::Configuration
- Includes:
- ActiveModel::Attributes
- Defined in:
- lib/geoblacklight/configuration.rb,
lib/geoblacklight/configuration/fields_config.rb,
lib/geoblacklight/configuration/leaflet_config.rb,
lib/geoblacklight/configuration/leaflet_sleep_config.rb,
lib/geoblacklight/configuration/leaflet_layers_config.rb,
lib/geoblacklight/configuration/legacy_settings_builder.rb,
lib/geoblacklight/configuration/default_settings_builder.rb,
lib/geoblacklight/configuration/display_note_shown_config.rb
Overview
Configuration for Geoblacklight
Defined Under Namespace
Classes: DefaultSettingsBuilder, DisplayNoteShownConfig, FieldsConfig, LeafletConfig, LeafletLayersConfig, LeafletSleepConfig, LegacySettingsBuilder
Instance Attribute Summary collapse
-
#display_notes_shown ⇒ Object
Display Notes to display / Non-prefixed default bootstrap class is alert-secondary.
-
#gbl_params ⇒ Object
Non-search-field GeoBlacklight application permitted params.
-
#help_text ⇒ Object
Toggle the help text feature that offers users context.
-
#metadata_shown ⇒ Object
Metadata shown in tool panel.
-
#relationships_shown ⇒ Object
Relationships to display.
-
#sidebar_static_map ⇒ Object
Enable catalog#show sidebar static map for items with the following viewer protocols.
-
#vector_download_formats ⇒ Object
Vector data download formats to be displayed.
-
#webservices_shown ⇒ Object
Web services shown in tool panel.
-
#wms_params ⇒ Object
WMS Parameters.
Instance Method Summary collapse
- #fields ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
-
#leaflet_options ⇒ Object
Returns Leaflet plugin settings to pass to the viewer.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/geoblacklight/configuration.rb', line 61 def initialize super self.download_path ||= Rails.root.join("tmp", "cache", "downloads") @gbl_params = [ :bbox, :email, :file, :format, :id, :logo, :provider, :type, :BBOX, :HEIGHT, :LAYERS, :QUERY_LAYERS, :URL, :WIDTH, :X, :Y ] @wms_params = { SERVICE: "WMS", VERSION: "1.1.1", REQUEST: "GetFeatureInfo", STYLES: "", SRS: "EPSG:4326", EXCEPTIONS: "application/json", INFO_FORMAT: "application/json" } @help_text = { viewer_protocol: %w[ cog dynamic_map_layer feature_layer iiif iiif_manifest image_map_layer index_map oembed pmtiles tiled_map_layer tilejson tms wms wmts xyz ] } @webservices_shown = %w[ wms tms wfs xyz wmts tilejson iiif feature_layer tiled_map_layer dynamic_map_layer image_map_layer cog pmtile ] @display_notes_shown = { danger: DisplayNoteShownConfig.new( bootstrap_alert_class: "alert-danger", icon: "fire-solid", note_prefix: "Danger: " ), info: DisplayNoteShownConfig.new( bootstrap_alert_class: "alert-info", icon: "circle-info-solid", note_prefix: "Info: " ), tip: DisplayNoteShownConfig.new( bootstrap_alert_class: "alert-success", icon: "lightbulb-solid", note_prefix: "Tip: " ), warning: DisplayNoteShownConfig.new( bootstrap_alert_class: "alert-warning", icon: "triangle-exclamation-solid", note_prefix: "Warning: " ) } end |
Instance Attribute Details
#display_notes_shown ⇒ Object
Display Notes to display / Non-prefixed default bootstrap class is alert-secondary
25 26 27 |
# File 'lib/geoblacklight/configuration.rb', line 25 def display_notes_shown @display_notes_shown end |
#gbl_params ⇒ Object
Non-search-field GeoBlacklight application permitted params
31 32 33 |
# File 'lib/geoblacklight/configuration.rb', line 31 def gbl_params @gbl_params end |
#help_text ⇒ Object
Toggle the help text feature that offers users context
28 29 30 |
# File 'lib/geoblacklight/configuration.rb', line 28 def help_text @help_text end |
#metadata_shown ⇒ Object
Metadata shown in tool panel
51 52 53 |
# File 'lib/geoblacklight/configuration.rb', line 51 def @metadata_shown end |
#relationships_shown ⇒ Object
Relationships to display
57 58 59 |
# File 'lib/geoblacklight/configuration.rb', line 57 def relationships_shown @relationships_shown end |
#sidebar_static_map ⇒ Object
Enable catalog#show sidebar static map for items with the following viewer protocols
37 38 39 |
# File 'lib/geoblacklight/configuration.rb', line 37 def @sidebar_static_map end |
#vector_download_formats ⇒ Object
Vector data download formats to be displayed
48 49 50 |
# File 'lib/geoblacklight/configuration.rb', line 48 def vector_download_formats @vector_download_formats end |
#webservices_shown ⇒ Object
Web services shown in tool panel
54 55 56 |
# File 'lib/geoblacklight/configuration.rb', line 54 def webservices_shown @webservices_shown end |
#wms_params ⇒ Object
WMS Parameters
34 35 36 |
# File 'lib/geoblacklight/configuration.rb', line 34 def wms_params @wms_params end |
Instance Method Details
#fields ⇒ Object
137 138 139 |
# File 'lib/geoblacklight/configuration.rb', line 137 def fields @fields ||= FieldsConfig.new end |
#leaflet_options ⇒ Object
Returns Leaflet plugin settings to pass to the viewer. @return
144 145 146 |
# File 'lib/geoblacklight/configuration.rb', line 144 def @leaflet_options ||= Geoblacklight::Configuration::LeafletConfig.new end |