Class: Geoblacklight::ItemMapViewerComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Geoblacklight::ItemMapViewerComponent
- Defined in:
- app/components/geoblacklight/item_map_viewer_component.rb
Instance Method Summary collapse
-
#display_tag ⇒ Object
If the conditions for this being IIIF content are met, dislay the IIIF viewer If it is oembed content, display the oembed viewer Otherwise display the base viewer which will take into account if it is open layers or generic content.
-
#initialize(document:) ⇒ ItemMapViewerComponent
constructor
A new instance of ItemMapViewerComponent.
- #render? ⇒ Boolean
Constructor Details
#initialize(document:) ⇒ ItemMapViewerComponent
Returns a new instance of ItemMapViewerComponent.
5 6 7 8 |
# File 'app/components/geoblacklight/item_map_viewer_component.rb', line 5 def initialize(document:) super() @document = document end |
Instance Method Details
#display_tag ⇒ Object
If the conditions for this being IIIF content are met, dislay the IIIF viewer If it is oembed content, display the oembed viewer Otherwise display the base viewer which will take into account if it is open layers or generic content.
14 15 16 17 18 19 20 |
# File 'app/components/geoblacklight/item_map_viewer_component.rb', line 14 def display_tag return iiif_manifest_tag if iiif_manifest? return iiif_image_tag if iiif_image? return if protocol == "Oembed" base_tag end |
#render? ⇒ Boolean
22 23 24 |
# File 'app/components/geoblacklight/item_map_viewer_component.rb', line 22 def render? @document end |