Class: Geoblacklight::ItemViewer
- Inherits:
-
Object
- Object
- Geoblacklight::ItemViewer
- Defined in:
- lib/geoblacklight/item_viewer.rb
Instance Method Summary collapse
- #cog ⇒ Object
- #dynamic_map_layer ⇒ Object
- #feature_layer ⇒ Object
- #iiif ⇒ Object
- #iiif_manifest ⇒ Object
- #image_map_layer ⇒ Object
- #index_map ⇒ Object
-
#initialize(references) ⇒ ItemViewer
constructor
A new instance of ItemViewer.
- #oembed ⇒ Object
- #pmtiles ⇒ Object
- #tiled_map_layer ⇒ Object
- #tilejson ⇒ Object
- #tms ⇒ Object
- #viewer_endpoint ⇒ Object
- #viewer_preference ⇒ Object
- #viewer_protocol ⇒ Object
- #wms ⇒ Object
- #wmts ⇒ Object
- #xyz ⇒ Object
Constructor Details
#initialize(references) ⇒ ItemViewer
Returns a new instance of ItemViewer.
5 6 7 |
# File 'lib/geoblacklight/item_viewer.rb', line 5 def initialize(references) @references = references end |
Instance Method Details
#cog ⇒ Object
71 72 73 |
# File 'lib/geoblacklight/item_viewer.rb', line 71 def cog @references.cog end |
#dynamic_map_layer ⇒ Object
35 36 37 |
# File 'lib/geoblacklight/item_viewer.rb', line 35 def dynamic_map_layer @references.dynamic_map_layer end |
#feature_layer ⇒ Object
39 40 41 |
# File 'lib/geoblacklight/item_viewer.rb', line 39 def feature_layer @references.feature_layer end |
#iiif ⇒ Object
23 24 25 |
# File 'lib/geoblacklight/item_viewer.rb', line 23 def iiif @references.iiif end |
#iiif_manifest ⇒ Object
27 28 29 |
# File 'lib/geoblacklight/item_viewer.rb', line 27 def iiif_manifest @references.iiif_manifest end |
#image_map_layer ⇒ Object
43 44 45 |
# File 'lib/geoblacklight/item_viewer.rb', line 43 def image_map_layer @references.image_map_layer end |
#index_map ⇒ Object
47 48 49 |
# File 'lib/geoblacklight/item_viewer.rb', line 47 def index_map @references.index_map end |
#oembed ⇒ Object
51 52 53 |
# File 'lib/geoblacklight/item_viewer.rb', line 51 def @references. end |
#pmtiles ⇒ Object
75 76 77 |
# File 'lib/geoblacklight/item_viewer.rb', line 75 def pmtiles @references.pmtiles end |
#tiled_map_layer ⇒ Object
31 32 33 |
# File 'lib/geoblacklight/item_viewer.rb', line 31 def tiled_map_layer @references.tiled_map_layer end |
#tilejson ⇒ Object
63 64 65 |
# File 'lib/geoblacklight/item_viewer.rb', line 63 def tilejson @references.tilejson end |
#tms ⇒ Object
55 56 57 |
# File 'lib/geoblacklight/item_viewer.rb', line 55 def tms @references.tms end |
#viewer_endpoint ⇒ Object
14 15 16 17 |
# File 'lib/geoblacklight/item_viewer.rb', line 14 def viewer_endpoint return "" if viewer_preference.nil? viewer_preference.values.first.to_s end |
#viewer_preference ⇒ Object
79 80 81 82 |
# File 'lib/geoblacklight/item_viewer.rb', line 79 def viewer_preference [cog, pmtiles, , index_map, tilejson, xyz, wmts, tms, wms, iiif_manifest, iiif, tiled_map_layer, dynamic_map_layer, image_map_layer, feature_layer].compact.map(&:to_hash).first end |
#viewer_protocol ⇒ Object
9 10 11 12 |
# File 'lib/geoblacklight/item_viewer.rb', line 9 def viewer_protocol return "map" if viewer_preference.nil? viewer_preference.keys.first.to_s end |
#wms ⇒ Object
19 20 21 |
# File 'lib/geoblacklight/item_viewer.rb', line 19 def wms @references.wms end |
#wmts ⇒ Object
67 68 69 |
# File 'lib/geoblacklight/item_viewer.rb', line 67 def wmts @references.wmts end |
#xyz ⇒ Object
59 60 61 |
# File 'lib/geoblacklight/item_viewer.rb', line 59 def xyz @references.xyz end |