Class: Geoblacklight::ArcgisComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Geoblacklight::ArcgisComponent
- Defined in:
- app/components/geoblacklight/arcgis_component.rb
Instance Attribute Summary collapse
-
#document ⇒ Object
readonly
Returns the value of attribute document.
Instance Method Summary collapse
-
#arcgis_link ⇒ Object
Generates an ArcGIS.com viewer url with params that can open content directly See: doc.arcgis.com/en/arcgis-online/reference/use-url-parameters.htm.
-
#initialize(document:, action:) ⇒ ArcgisComponent
constructor
A new instance of ArcgisComponent.
- #key ⇒ Object
Constructor Details
#initialize(document:, action:) ⇒ ArcgisComponent
Returns a new instance of ArcgisComponent.
7 8 9 10 |
# File 'app/components/geoblacklight/arcgis_component.rb', line 7 def initialize(document:, action:, **) @document = document super() end |
Instance Attribute Details
#document ⇒ Object (readonly)
Returns the value of attribute document.
5 6 7 |
# File 'app/components/geoblacklight/arcgis_component.rb', line 5 def document @document end |
Instance Method Details
#arcgis_link ⇒ Object
Generates an ArcGIS.com viewer url with params that can open content directly See: doc.arcgis.com/en/arcgis-online/reference/use-url-parameters.htm
14 15 16 17 18 19 |
# File 'app/components/geoblacklight/arcgis_component.rb', line 14 def arcgis_link params = URI.encode_www_form( urls: document.arcgis_urls ) Settings.ARCGIS_BASE_URL + "?" + params end |
#key ⇒ Object
21 22 23 |
# File 'app/components/geoblacklight/arcgis_component.rb', line 21 def key "arcgis" end |