Class: Geoblacklight::ItemViewer

Inherits:
Object
  • Object
show all
Defined in:
lib/geoblacklight/item_viewer.rb

Instance Method Summary collapse

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

#cogObject



71
72
73
# File 'lib/geoblacklight/item_viewer.rb', line 71

def cog
  @references.cog
end

#dynamic_map_layerObject



35
36
37
# File 'lib/geoblacklight/item_viewer.rb', line 35

def dynamic_map_layer
  @references.dynamic_map_layer
end

#feature_layerObject



39
40
41
# File 'lib/geoblacklight/item_viewer.rb', line 39

def feature_layer
  @references.feature_layer
end

#iiifObject



23
24
25
# File 'lib/geoblacklight/item_viewer.rb', line 23

def iiif
  @references.iiif
end

#iiif_manifestObject



27
28
29
# File 'lib/geoblacklight/item_viewer.rb', line 27

def iiif_manifest
  @references.iiif_manifest
end

#image_map_layerObject



43
44
45
# File 'lib/geoblacklight/item_viewer.rb', line 43

def image_map_layer
  @references.image_map_layer
end

#index_mapObject



47
48
49
# File 'lib/geoblacklight/item_viewer.rb', line 47

def index_map
  @references.index_map
end

#oembedObject



51
52
53
# File 'lib/geoblacklight/item_viewer.rb', line 51

def oembed
  @references.oembed
end

#pmtilesObject



75
76
77
# File 'lib/geoblacklight/item_viewer.rb', line 75

def pmtiles
  @references.pmtiles
end

#tiled_map_layerObject



31
32
33
# File 'lib/geoblacklight/item_viewer.rb', line 31

def tiled_map_layer
  @references.tiled_map_layer
end

#tilejsonObject



63
64
65
# File 'lib/geoblacklight/item_viewer.rb', line 63

def tilejson
  @references.tilejson
end

#tmsObject



55
56
57
# File 'lib/geoblacklight/item_viewer.rb', line 55

def tms
  @references.tms
end

#viewer_endpointObject



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_preferenceObject



79
80
81
82
# File 'lib/geoblacklight/item_viewer.rb', line 79

def viewer_preference
  [cog, pmtiles, oembed, 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_protocolObject



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

#wmsObject



19
20
21
# File 'lib/geoblacklight/item_viewer.rb', line 19

def wms
  @references.wms
end

#wmtsObject



67
68
69
# File 'lib/geoblacklight/item_viewer.rb', line 67

def wmts
  @references.wmts
end

#xyzObject



59
60
61
# File 'lib/geoblacklight/item_viewer.rb', line 59

def xyz
  @references.xyz
end