blacklight-maps 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc71dc7dfe0b126d989b4076ee3caf03f16b319c
4
- data.tar.gz: 94a0708fa6cab6c59b73e5c6519b95addc33efdf
3
+ metadata.gz: 05ca6bf4dd78fffb3431ac91f5d282355335687c
4
+ data.tar.gz: cf7ac2c7cffdb72e9dd5ab495dd312645dabb813
5
5
  SHA512:
6
- metadata.gz: 1e9c2ca3243093244412d93dd265bd8b06ecaacd15892fdc9a92e2fbf15535df24205d56e81d9d46b77468e8d13ce61ff5d1556c24610eec1798c384302278de
7
- data.tar.gz: de5b485da3d27a1b3b7d59db34bb62c47dedffd0db6e6ce91baf73e8d7becf8628c03d06ed050cf261e736d104f9859b5e482e7b38e65bc5866ca5217ddf32c7
6
+ metadata.gz: 9d39e9f34cf2f0a89b65dca8b8052c2aa594649a2ed8bb5c0ce7627b34523e4ce54c69d77adf4933a0e3d53b07e82992371045d58597a48efe3cd002e5e19a60
7
+ data.tar.gz: f2d009514030f8e4e44512812a385569148507ba7b094d9759e5b59d8214908ee6224ffac3a9e0a78992e1ef8c89c27516b2f28947ccfba1d2de5f57fde7dc88
@@ -7,7 +7,7 @@
7
7
  var options = $.extend({
8
8
  tileurl : 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
9
9
  mapattribution : 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
10
- initialZoom: 2,
10
+ initialzoom: 2,
11
11
  singlemarkermode: true,
12
12
  searchcontrol: false,
13
13
  catalogpath: 'catalog',
@@ -68,7 +68,6 @@
68
68
  // Setup Leaflet map
69
69
  map = L.map(this.id, {
70
70
  center: [0, 0],
71
- zoom: options.initialZoom
72
71
  });
73
72
 
74
73
  L.tileLayer(options.tileurl, {
@@ -147,12 +146,18 @@
147
146
 
148
147
  /**
149
148
  * Sets the view of the map, based off of the map bounds
149
+ * options.initialzoom is invoked for catalog#show views (unless it would obscure features)
150
150
  */
151
151
  function setMapBounds() {
152
152
  map.fitBounds(mapBounds(), {
153
153
  padding: [10, 10],
154
154
  maxZoom: options.maxzoom
155
155
  });
156
+ if ($('#document').length) {
157
+ if (map.getZoom() > options.initialzoom) {
158
+ map.setZoom(options.initialzoom)
159
+ }
160
+ }
156
161
  }
157
162
 
158
163
  /**
@@ -6,21 +6,21 @@ require 'blacklight/maps/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "blacklight-maps"
8
8
  spec.version = Blacklight::Maps::VERSION
9
- spec.authors = ["Chris Beer", "Jack Reed"]
10
- spec.email = ["cabeer@stanford.edu", "pjreed@stanford.edu"]
9
+ spec.authors = ["Chris Beer", "Jack Reed", "Eben English"]
10
+ spec.email = ["cabeer@stanford.edu", "pjreed@stanford.edu", "eenglish@bpl.org"]
11
11
  spec.summary = %q{Maps for Blacklight}
12
- spec.homepage = ""
13
- spec.license = "Apache 2.0"
12
+ spec.homepage = "https://github.com/projectblacklight/blacklight-maps"
13
+ spec.license = "Apache-2.0"
14
14
 
15
15
  spec.files = `git ls-files -z`.split("\x0")
16
16
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ["lib"]
19
19
 
20
- spec.add_dependency "rails"
21
- spec.add_dependency "blacklight", ">= 6.1.0"
20
+ spec.add_dependency "rails", "< 6"
21
+ spec.add_dependency "blacklight", ">= 6.1.0", "< 7.0.0"
22
22
  spec.add_dependency "bootstrap-sass", "~> 3.2"
23
- spec.add_dependency "leaflet-rails"
23
+ spec.add_dependency "leaflet-rails", "0.7.7"
24
24
  spec.add_dependency "leaflet-markercluster-rails"
25
25
 
26
26
  spec.add_development_dependency "bundler", "~> 1.5"
@@ -3,5 +3,5 @@ development:
3
3
  jetty_port: 8983
4
4
  test:
5
5
  startup_wait: 60
6
- jetty_port: <%= ENV['TEST_JETTY_PORT'] || 8888 %>
6
+ jetty_port: <%= ENV['TEST_JETTY_PORT'] || 8983 %>
7
7
  <%= ENV['TEST_JETTY_PATH'] ? "jetty_home: " + ENV['TEST_JETTY_PATH'] : '' %>
@@ -0,0 +1,20 @@
1
+ zh:
2
+ blacklight:
3
+
4
+ maps:
5
+ interactions:
6
+ bbox_search: 'View items that intersect with this bounding box'
7
+ placename_search: 'View items from this location'
8
+ item: '资料'
9
+ point_search: 'View items from this location'
10
+ search_ctrl_cue: 'Search for all items within the current map window'
11
+ title: '地图'
12
+ leader: 'Click on a marker to search for items from that location.'
13
+
14
+ search:
15
+ filters:
16
+ coordinates:
17
+ bbox: 'Bounding Box'
18
+ point: 'Coordinates'
19
+ view:
20
+ maps: '地图'
@@ -0,0 +1,20 @@
1
+ it:
2
+ blacklight:
3
+
4
+ maps:
5
+ interactions:
6
+ bbox_search: 'View items that intersect with this bounding box'
7
+ placename_search: 'View items from this location'
8
+ item: 'item'
9
+ point_search: 'View items from this location'
10
+ search_ctrl_cue: 'Search for all items within the current map window'
11
+ title: 'Mappa'
12
+ leader: 'Click on a marker to search for items from that location.'
13
+
14
+ search:
15
+ filters:
16
+ coordinates:
17
+ bbox: 'Bounding Box'
18
+ point: 'Coordinates'
19
+ view:
20
+ maps: 'Mappa'
@@ -1,5 +1,5 @@
1
1
  module Blacklight
2
2
  module Maps
3
- VERSION = "0.5.0"
3
+ VERSION = "0.5.1"
4
4
  end
5
5
  end
@@ -72,8 +72,9 @@ describe "catalog#show view", js: true do
72
72
 
73
73
  before :each do
74
74
  CatalogController.configure_blacklight do |config|
75
- # set maxzoom so we can test whether initial zoom is correct
75
+ # set zoom config so we can test whether setMapBounds() is correct
76
76
  config.view.maps.maxzoom = 8
77
+ config.view.maps.show_initial_zoom = 10
77
78
  end
78
79
  visit solr_document_path("2009373514")
79
80
  end
@@ -83,7 +84,7 @@ describe "catalog#show view", js: true do
83
84
  end
84
85
 
85
86
  it "should zoom to the correct map bounds" do
86
- # if initial zoom >= maxzoom, zoom-in control will be disabled
87
+ # if setMapBounds() zoom >= maxzoom, zoom-in control will be disabled
87
88
  expect(page).to have_selector(".leaflet-control-zoom-in.leaflet-disabled")
88
89
  end
89
90
 
metadata CHANGED
@@ -1,30 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight-maps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
8
8
  - Jack Reed
9
+ - Eben English
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2016-06-16 00:00:00.000000000 Z
13
+ date: 2019-01-10 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: rails
16
17
  requirement: !ruby/object:Gem::Requirement
17
18
  requirements:
18
- - - ">="
19
+ - - "<"
19
20
  - !ruby/object:Gem::Version
20
- version: '0'
21
+ version: '6'
21
22
  type: :runtime
22
23
  prerelease: false
23
24
  version_requirements: !ruby/object:Gem::Requirement
24
25
  requirements:
25
- - - ">="
26
+ - - "<"
26
27
  - !ruby/object:Gem::Version
27
- version: '0'
28
+ version: '6'
28
29
  - !ruby/object:Gem::Dependency
29
30
  name: blacklight
30
31
  requirement: !ruby/object:Gem::Requirement
@@ -32,6 +33,9 @@ dependencies:
32
33
  - - ">="
33
34
  - !ruby/object:Gem::Version
34
35
  version: 6.1.0
36
+ - - "<"
37
+ - !ruby/object:Gem::Version
38
+ version: 7.0.0
35
39
  type: :runtime
36
40
  prerelease: false
37
41
  version_requirements: !ruby/object:Gem::Requirement
@@ -39,6 +43,9 @@ dependencies:
39
43
  - - ">="
40
44
  - !ruby/object:Gem::Version
41
45
  version: 6.1.0
46
+ - - "<"
47
+ - !ruby/object:Gem::Version
48
+ version: 7.0.0
42
49
  - !ruby/object:Gem::Dependency
43
50
  name: bootstrap-sass
44
51
  requirement: !ruby/object:Gem::Requirement
@@ -57,16 +64,16 @@ dependencies:
57
64
  name: leaflet-rails
58
65
  requirement: !ruby/object:Gem::Requirement
59
66
  requirements:
60
- - - ">="
67
+ - - '='
61
68
  - !ruby/object:Gem::Version
62
- version: '0'
69
+ version: 0.7.7
63
70
  type: :runtime
64
71
  prerelease: false
65
72
  version_requirements: !ruby/object:Gem::Requirement
66
73
  requirements:
67
- - - ">="
74
+ - - '='
68
75
  - !ruby/object:Gem::Version
69
- version: '0'
76
+ version: 0.7.7
70
77
  - !ruby/object:Gem::Dependency
71
78
  name: leaflet-markercluster-rails
72
79
  requirement: !ruby/object:Gem::Requirement
@@ -183,6 +190,7 @@ description:
183
190
  email:
184
191
  - cabeer@stanford.edu
185
192
  - pjreed@stanford.edu
193
+ - eenglish@bpl.org
186
194
  executables: []
187
195
  extensions: []
188
196
  extra_rdoc_files: []
@@ -209,7 +217,9 @@ files:
209
217
  - app/views/catalog/map.html.erb
210
218
  - blacklight-maps.gemspec
211
219
  - config/jetty.yml
220
+ - config/locales/blacklight-maps-zh.yml
212
221
  - config/locales/blacklight-maps.en.yml
222
+ - config/locales/blacklight-maps.it.yml
213
223
  - config/routes.rb
214
224
  - docs/blacklight-maps_index-view.png
215
225
  - docs/blacklight-maps_map-view.png
@@ -243,9 +253,9 @@ files:
243
253
  - spec/spec_helper.rb
244
254
  - spec/test_app_templates/Gemfile.extra
245
255
  - spec/test_app_templates/lib/generators/test_app_generator.rb
246
- homepage: ''
256
+ homepage: https://github.com/projectblacklight/blacklight-maps
247
257
  licenses:
248
- - Apache 2.0
258
+ - Apache-2.0
249
259
  metadata: {}
250
260
  post_install_message:
251
261
  rdoc_options: []
@@ -263,7 +273,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
263
273
  version: '0'
264
274
  requirements: []
265
275
  rubyforge_project:
266
- rubygems_version: 2.4.6
276
+ rubygems_version: 2.6.12
267
277
  signing_key:
268
278
  specification_version: 4
269
279
  summary: Maps for Blacklight