Skip to content

Commit

Permalink
Merge pull request #28 from NYULibraries/release/1.9.1-basemaps-updates
Browse files Browse the repository at this point in the history
Release/1.9.2 basemaps updates
  • Loading branch information
andrewbattista authored Feb 22, 2019
2 parents 52ea2c7 + b1f0054 commit db5ae06
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 11 deletions.
67 changes: 67 additions & 0 deletions app/assets/javascripts/basemaps.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// basemaps

GeoBlacklight.Basemaps = {
darkMatter: L.tileLayer(
'https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{retina}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <a href="https://carto.com/attributions">Carto</a>',
maxZoom: 18,
worldCopyJump: true,
retina: '@2x',
detectRetina: false
}
),
positron: L.tileLayer(
'https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{retina}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <a href="https://carto.com/attributions">Carto</a>',
maxZoom: 18,
worldCopyJump: true,
retina: '@2x',
detectRetina: false
}
),
positronLite: L.tileLayer(
'https://{s}.basemaps.cartocdn.com/light_nolabels/{z}/{x}/{y}{retina}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <a href="https://carto.com/attributions">Carto</a>',
maxZoom: 18,
worldCopyJump: true,
retina: '@2x',
detectRetina: false
}
),
worldAntique: L.tileLayer(
'https://cartocdn_{s}.global.ssl.fastly.net/base-antique/{z}/{x}/{y}{retina}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <a href="https://carto.com/attributions">Carto</a>',
maxZoom: 18,
worldCopyJump: true,
retina: '@2x',
detectRetina: false
}
),
worldEco: L.tileLayer(
'https://cartocdn_{s}.global.ssl.fastly.net/base-eco/{z}/{x}/{y}{retina}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <a href="https://carto.com/attributions">Carto</a>',
maxZoom: 18,
worldCopyJump: true,
retina: '@2x',
detectRetina: false
}
),
flatBlue: L.tileLayer(
'https://cartocdn_{s}.global.ssl.fastly.net/base-flatblue/{z}/{x}/{y}{retina}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <a href="https://carto.com/attributions">Carto</a>',
maxZoom: 18,
worldCopyJump: true,
retina: '@2x',
detectRetina: false
}
),
midnightCommander: L.tileLayer(
'https://cartocdn_{s}.global.ssl.fastly.net/base-midnight/{z}/{x}/{y}{retina}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <a href="https://carto.com/attributions">Carto</a>',
maxZoom: 18,
worldCopyJump: true,
retina: '@2x',
detectRetina: false
}
)
};
4 changes: 2 additions & 2 deletions app/assets/javascripts/modules/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Blacklight.onLoad(function() {
});

// Log Open in CartoDB Clicks
$(document).on('click', 'li.exports a:contains("Open in CartoDB")', function(e) {
window._gaq.push(['_trackEvent', 'Open in CartoDB', window.location.pathname.replace('/catalog/', '')]);
$(document).on('click', 'li.exports a:contains("Open in Carto")', function(e) {
window._gaq.push(['_trackEvent', 'Open in Carto', window.location.pathname.replace('/catalog/', '')]);
});
});
11 changes: 4 additions & 7 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class CatalogController < ApplicationController
config.add_show_field Settings.FIELDS.SPATIAL_COVERAGE, label: 'Place(s)', itemprop: 'spatial', link_to_search: true, separator: '; '
config.add_show_field Settings.FIELDS.SUBJECT, label: 'Subject(s)', itemprop: 'keywords', link_to_search: true
config.add_show_field Settings.FIELDS.FILE_FORMAT, label: 'Format(s)', itemprop: 'formats', link_to_search: true
config.add_show_field Settings.FIELDS.TEMPORAL, label: 'Year', itemprop: 'temporal'
config.add_show_field Settings.FIELDS.TEMPORAL, label: 'Year(s)', itemprop: 'temporal'
config.add_show_field Settings.FIELDS.PROVENANCE, label: 'Held by', link_to_search: true

# "fielded" search configuration. Used by pulldown among other places.
Expand Down Expand Up @@ -220,13 +220,10 @@ class CatalogController < ApplicationController
config.show.document_actions.delete(:sms)
config.show.document_actions.delete(:citation)

# Configure basemap provider for GeoBlacklight maps (uses https only basemap
# Us this menu to configure basemap provider for GeoBlacklight maps (uses https only basemap
# providers with open licenses)
# Valid basemaps include:
# 'mapquest' http://developer.mapquest.com/web/products/open/map
# 'positron' http://cartodb.com/basemaps/
# 'darkMatter' http://cartodb.com/basemaps/
config.basemap_provider = 'positron'

config.basemap_provider = 'positronLite'


# Configuration for autocomplete suggestor
Expand Down
2 changes: 1 addition & 1 deletion config/locales/geoblacklight.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ en:
download_link: '%{download_format}'
export_formats: 'Other Formats'
export_link: 'Download'
export_shapefile_link: 'Generated Shapefile'
export_shapefile_link: 'Derived Shapefile'
show:
attribute: 'Variable'
value: 'Value'
Expand Down
2 changes: 1 addition & 1 deletion lib/nyugeoblacklight/curated_collections.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def CuratedCollections.collections
def CuratedCollections.recent
[
{title: "2015 Dublin LiDAR", description: "High-density LiDAR datasets of Dublin, from Debra Laefer (NYU) and collaborators", f: {"dct_isPartOf_sm" => ["2015 Dublin LiDAR"]}},
{title: "Mexico Encuesta Intercensal 2015", description: "Layers from the 2015 Mexican Intercensal Survey", f: {"dct_isPartOf_sm" => ["Encuesta Intercensal 2015"]}},
{title: "2004 New York State Tax Parcels", description: "Point data on property ownership and land value", f: {"dct_isPartOf_sm" => ["NYS GIS Clearinghouse"]}},
{title: "Soviet Topographic Maps of the Arabian Peninsula", description: "Raster scans of Soviet military topographic maps produced in the late 1970s", f: { "dc_publisher_s" => ["Omni Resources (Firm)"]}}
]
end
Expand Down

0 comments on commit db5ae06

Please sign in to comment.