diff --git a/Gemfile b/Gemfile index 157ec38e9..3afbadab4 100644 --- a/Gemfile +++ b/Gemfile @@ -100,7 +100,7 @@ gem 'noticed' gem 'paper_trail' # Image migration -gem 'geoblacklight_sidecar_images', git: "https://github.com/geoblacklight/geoblacklight_sidecar_images.git", branch: "feature/statesman-update" +gem 'geoblacklight_sidecar_images', git: "https://github.com/geoblacklight/geoblacklight_sidecar_images.git", branch: "develop" gem 'mini_magick', '~> 4.9.4' gem "image_processing", ">= 1.2" diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 5cf3ccc07..b9d596114 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -40,6 +40,7 @@ //= require geoblacklight/viewers/viewer //= require ./geoportal/viewers/map //= require ./geoportal/viewers/b1g_image +//= require ./geoportal/viewers/cog //= require ./geoportal/viewers/download //= require ./geoportal/viewers/esri //= require ./geoportal/viewers/esri/dynamic_map_layer @@ -50,10 +51,10 @@ //= require ./geoportal/viewers/iiif_manifest //= require ./geoportal/viewers/index_map //= require geoblacklight/viewers/oembed - -//= require ./geoportal/viewers/wms +//= require ./geoportal/viewers/pmtiles //= require ./geoportal/viewers/tilejson //= require ./geoportal/viewers/tms +//= require ./geoportal/viewers/wms //= require ./geoportal/viewers/wmts //= require ./geoportal/viewers/xyz diff --git a/app/assets/javascripts/geoportal/viewers/cog.js b/app/assets/javascripts/geoportal/viewers/cog.js new file mode 100644 index 000000000..639d33e88 --- /dev/null +++ b/app/assets/javascripts/geoportal/viewers/cog.js @@ -0,0 +1,5 @@ +//= require geoblacklight/viewers/viewer + +GeoBlacklight.Viewer.Cog = GeoBlacklight.Viewer.extend({ + load: function() {} +}); \ No newline at end of file diff --git a/app/assets/javascripts/geoportal/viewers/iiif.js b/app/assets/javascripts/geoportal/viewers/iiif.js new file mode 100644 index 000000000..e50ca262b --- /dev/null +++ b/app/assets/javascripts/geoportal/viewers/iiif.js @@ -0,0 +1,25 @@ +//= require geoblacklight/viewers/viewer + +GeoBlacklight.Viewer.Iiif = GeoBlacklight.Viewer.extend({ + load: function() { + this.adjustLayout(); + + this.map = L.map(this.element, { + center: [0, 0], + crs: L.CRS.Simple, + zoom: 0 + }); + this.loadControls(); + this.iiifLayer = L.tileLayer.iiif(this.data.url) + .addTo(this.map); + }, + + adjustLayout: function() { + + // hide attribute table + $('#table-container').hide(); + + // expand viewer element + $(this.element).parent().attr('class', 'col-md-12'); + } +}); diff --git a/app/assets/javascripts/geoportal/viewers/oembed.js b/app/assets/javascripts/geoportal/viewers/oembed.js new file mode 100644 index 000000000..004d6d371 --- /dev/null +++ b/app/assets/javascripts/geoportal/viewers/oembed.js @@ -0,0 +1,13 @@ +//= require geoblacklight/viewers/viewer + +GeoBlacklight.Viewer.Oembed = GeoBlacklight.Viewer.extend({ + load: function() { + var $el = $(this.element); + $.getJSON(this.data.url, function(data){ + if (data === null){ + return; + } + $el.html(data.html); + }); + }, +}); diff --git a/app/assets/javascripts/geoportal/viewers/pmtiles.js b/app/assets/javascripts/geoportal/viewers/pmtiles.js new file mode 100644 index 000000000..359a0bbc4 --- /dev/null +++ b/app/assets/javascripts/geoportal/viewers/pmtiles.js @@ -0,0 +1,5 @@ +//= require geoblacklight/viewers/viewer + +GeoBlacklight.Viewer.Pmtiles = GeoBlacklight.Viewer.extend({ + load: function() {} +}); \ No newline at end of file