geoblacklight 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. checksums.yaml +5 -13
  2. data/.coveralls.yml +1 -0
  3. data/.gitmodules +1 -1
  4. data/.travis.yml +9 -0
  5. data/Gemfile +18 -0
  6. data/README.md +36 -38
  7. data/Rakefile +9 -9
  8. data/app/assets/fonts/geoblacklight.eot +0 -0
  9. data/app/assets/fonts/geoblacklight.svg +117 -0
  10. data/app/assets/fonts/geoblacklight.ttf +0 -0
  11. data/app/assets/fonts/geoblacklight.woff +0 -0
  12. data/app/assets/images/blacklight/logo.png +0 -0
  13. data/app/assets/javascripts/geoblacklight/application.js +1 -0
  14. data/app/assets/javascripts/geoblacklight/geoblacklight.js +86 -2
  15. data/app/assets/javascripts/geoblacklight/modules/collapse.js +6 -0
  16. data/app/assets/javascripts/geoblacklight/modules/download.js +45 -0
  17. data/app/assets/javascripts/geoblacklight/modules/geosearch.js +77 -0
  18. data/app/assets/javascripts/geoblacklight/modules/home.js +10 -0
  19. data/app/assets/javascripts/geoblacklight/modules/item.js +72 -0
  20. data/app/assets/javascripts/geoblacklight/modules/map-view.js +7 -7
  21. data/app/assets/javascripts/geoblacklight/modules/results.js +50 -0
  22. data/app/assets/stylesheets/geoblacklight/_geoblacklight.css.scss +20 -0
  23. data/app/assets/stylesheets/geoblacklight/_styles.css.scss +44 -0
  24. data/app/assets/stylesheets/geoblacklight/application.css.scss +3 -0
  25. data/app/assets/stylesheets/geoblacklight/modules/home.css.scss +3 -0
  26. data/app/assets/stylesheets/geoblacklight/modules/icon-customization.css.scss +10 -0
  27. data/app/assets/stylesheets/geoblacklight/modules/icons.css.scss +77 -0
  28. data/app/assets/stylesheets/geoblacklight/modules/item.css.scss +4 -0
  29. data/app/assets/stylesheets/geoblacklight/modules/results.css.scss +29 -0
  30. data/app/controllers/download_controller.rb +22 -94
  31. data/app/controllers/wms_controller.rb +2 -74
  32. data/app/helpers/geoblacklight_helper.rb +6 -36
  33. data/app/views/catalog/_document_split.html.erb +4 -0
  34. data/app/views/catalog/_home_text.html.erb +2 -39
  35. data/app/views/catalog/_index_split_default.html.erb +24 -0
  36. data/app/views/catalog/_show_default.html.erb +4 -57
  37. data/app/views/catalog/_show_header_default.html.erb +8 -0
  38. data/app/views/catalog/_show_sidebar.html.erb +17 -57
  39. data/app/views/catalog/_upper_metadata.html.erb +38 -0
  40. data/config/initializers/rails_config.rb +3 -0
  41. data/config/jetty.yml +6 -0
  42. data/config/locales/geoblacklight.en.yml +5 -0
  43. data/geoblacklight.gemspec +5 -5
  44. data/lib/generators/geoblacklight/install_generator.rb +45 -15
  45. data/lib/generators/geoblacklight/templates/geoblacklight.css.scss +2 -78
  46. data/lib/generators/geoblacklight/templates/settings.yml +9 -0
  47. data/lib/geoblacklight.rb +13 -0
  48. data/lib/geoblacklight/controller_override.rb +18 -0
  49. data/lib/geoblacklight/download.rb +63 -0
  50. data/lib/geoblacklight/download/kmz_download.rb +14 -0
  51. data/lib/geoblacklight/download/shapefile_download.rb +14 -0
  52. data/lib/geoblacklight/engine.rb +11 -1
  53. data/lib/geoblacklight/solr_document.rb +30 -0
  54. data/lib/geoblacklight/version.rb +1 -1
  55. data/lib/geoblacklight/view_helper_override.rb +17 -0
  56. data/lib/geoblacklight/wms_layer.rb +38 -0
  57. data/lib/geoblacklight/wms_layer/feature_info_response.rb +30 -0
  58. data/lib/tasks/geoblacklight.rake +15 -0
  59. data/spec/features/download_layer_spec.rb +18 -0
  60. data/spec/features/home_page_spec.rb +49 -0
  61. data/spec/features/layer_inspection_spec.rb +9 -0
  62. data/spec/features/layer_preview_spec.rb +16 -0
  63. data/spec/features/split_view.html.erb_spec.rb +35 -0
  64. data/spec/fixtures/test-berkeley-fields.json +44 -0
  65. data/spec/lib/geoblacklight/controller_override_spec.rb +28 -0
  66. data/spec/lib/geoblacklight/download/kmz_download_spec.rb +15 -0
  67. data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +14 -0
  68. data/spec/lib/geoblacklight/download_spec.rb +76 -0
  69. data/spec/lib/geoblacklight/solr_document.rb +52 -0
  70. data/spec/lib/geoblacklight/view_helper_override_spec.rb +23 -0
  71. data/spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb +43 -0
  72. data/spec/lib/geoblacklight/wms_layer_spec.rb +33 -0
  73. data/spec/spec_helper.rb +3 -6
  74. data/spec/test_app_templates/lib/generators/test_app_generator.rb +2 -2
  75. data/spec/views/catalog/_document_split.html.erb_spec.rb +5 -0
  76. data/spec/views/catalog/_index_split.html.erb_spec.rb +5 -0
  77. data/template.rb +10 -0
  78. data/vendor/assets/javascripts/native.history.js +1 -0
  79. metadata +129 -82
  80. data/app/assets/images/geoblacklight/src_berkeley.png +0 -0
  81. data/app/assets/images/geoblacklight/src_cambridge.png +0 -0
  82. data/app/assets/images/geoblacklight/src_harvard.png +0 -0
  83. data/app/assets/images/geoblacklight/src_maryland.png +0 -0
  84. data/app/assets/images/geoblacklight/src_massgis.png +0 -0
  85. data/app/assets/images/geoblacklight/src_mit.png +0 -0
  86. data/app/assets/images/geoblacklight/src_princeton.png +0 -0
  87. data/app/assets/images/geoblacklight/src_stanford.png +0 -0
  88. data/app/assets/images/geoblacklight/src_tufts.png +0 -0
  89. data/app/assets/images/geoblacklight/src_un.png +0 -0
  90. data/app/assets/images/geoblacklight/type_arc.png +0 -0
  91. data/app/assets/images/geoblacklight/type_dot.png +0 -0
  92. data/app/assets/images/geoblacklight/type_library.png +0 -0
  93. data/app/assets/images/geoblacklight/type_map.png +0 -0
  94. data/app/assets/images/geoblacklight/type_polygon.png +0 -0
  95. data/app/assets/images/geoblacklight/type_raster.png +0 -0
  96. data/app/assets/javascripts/geoblacklight/modules/map-home.js +0 -25
  97. data/app/assets/javascripts/geoblacklight/modules/map-results.js +0 -72
  98. data/app/views/catalog/_document_list.html.erb +0 -12
  99. data/app/views/catalog/_index_header_default.html.erb +0 -59
  100. data/spec/fixtures/geoblacklight_schema/transformed.json +0 -53
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZDFmNTBjNGY5MjdhODA5MjU0ZWQyZTY2ZmMwNWQ4YWZjZGQ3M2YyMA==
5
- data.tar.gz: !binary |-
6
- ODk4NTkyNGI2YTFmOGM4OTEwZTUyZjFiMTJjZTZlMGQ3MzUzZTEzNA==
2
+ SHA1:
3
+ metadata.gz: a1123f9433bd523732034ac5343eb3e0b32c0f7d
4
+ data.tar.gz: 0b6e24f54f7a7a527e818b85619bc98c0a8efd2a
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- ZDhlNjgyYmU1NTg5OTI2MDIxZWI4ODJhM2ZjNTYwZTYwYWVlNjhjZjhhZWIx
10
- NmE1Zjc5MDg1YTUzOGZiZjIyMDgzYWJlM2E2MDkwZWQ2OGY5NGY5ODVjMDNh
11
- OWU0YmVkZTM5YTg0ZmVkZmI3MDMxNDNiNDZjNTZlNjZmODA1NGE=
12
- data.tar.gz: !binary |-
13
- YzY5NmJiY2U5MjJlODg5ZjEyMjY2YTZiYTFiY2FiNjEyMGQ5ZWM3MmUyMWY0
14
- ODJmYWI4ZTFlMjA4ZjJmZTQ3ZTMwMDFkZmMwNjQ5NmRjZjg0YTJmNGJjMDk1
15
- ODdiNTZhOTAwYzg0NzFmY2MwZWNhYzgzMTAyOGMzNGE3Njg1YmI=
6
+ metadata.gz: 65edd6f5f20a09c5146cbb1102132a19d1c86de352023b83e97df35f6743b455f0ecb3647a33281e27fbbfbc5363c46286716ac1a923016973a86a3bfa42f143
7
+ data.tar.gz: 3c3b687f1b5e1d8ae657658c1ce7d83780c7c26f1f5b0762fb82508b6485705a82688d0d32fb5a367bd8d1bfadad24e78e66496969226e87a5f776772c0eff2d
data/.coveralls.yml ADDED
@@ -0,0 +1 @@
1
+ service_name: travis-ci
data/.gitmodules CHANGED
@@ -1,5 +1,5 @@
1
1
  [submodule "geoblacklight-schema"]
2
2
  path = schema
3
- url = https://github.com/sul-dlss/geoblacklight-schema.git
3
+ url = https://github.com/geoblacklight/geoblacklight-schema.git
4
4
  branch = master
5
5
 
data/.travis.yml ADDED
@@ -0,0 +1,9 @@
1
+ notifications:
2
+ email: false
3
+
4
+ rvm:
5
+ - 2.1
6
+
7
+ env:
8
+ global:
9
+ - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
data/Gemfile CHANGED
@@ -3,6 +3,24 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in geoblacklight.gemspec
4
4
  gemspec
5
5
 
6
+ # If we don't specify 2.11.0 we'll end up with sprockets 2.12.0 in the main
7
+ # Gemfile.lock but since sass-rails gets generated (rails new) into the test app
8
+ # it'll want sprockets 2.11.0 and we'll have a conflict
9
+ gem 'sprockets', '2.11.0'
10
+
11
+ # If we don't specify 3.2.15 we'll end up with sass 3.3.2 in the main
12
+ # Gemfile.lock but since sass-rails gets generated (rails new) into the test app
13
+ # it'll want sass 3.2.0 and we'll have a conflict
14
+ gem 'sass', '~> 3.2.0'
15
+ gem 'bootstrap-sass', ">= 3.2"
16
+
17
+ group :test do
18
+ # Peg simplecov to < 0.8 until this is resolved:
19
+ # https://github.com/colszowka/simplecov/issues/281
20
+ gem 'simplecov', '~> 0.7.1', require: false
21
+ gem 'coveralls', require: false
22
+ end
23
+
6
24
  # load local rails test instance Gemfile
7
25
  file = File.expand_path("Gemfile", ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path("../spec/internal", __FILE__))
8
26
  if File.exists?(file)
data/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # Geoblacklight
2
2
 
3
- GeoBlacklight started at Stanford and its goal is to provide a
4
- world-class discovery platform for geospatial (GIS) holdings. It
3
+ [![Build Status](https://travis-ci.org/geoblacklight/geoblacklight.svg?branch=master)](https://travis-ci.org/geoblacklight/geoblacklight) | [![Coverage Status](https://img.shields.io/coveralls/geoblacklight/geoblacklight.svg)](https://coveralls.io/r/geoblacklight/geoblacklight?branch=coveralls)
4
+
5
+ GeoBlacklight is a world-class discovery platform for geospatial (GIS) holdings. It
5
6
  is an open collaborative project aiming to build off of the successes
6
7
  of the Blacklight Solr-powered discovery interface and the
7
8
  multi-institutional OpenGeoportal federated metadata sharing
@@ -11,7 +12,7 @@ More coming soon!
11
12
 
12
13
  ## Features
13
14
 
14
- * Text search with scoring formula
15
+ * Text and spatial search with scoring formula
15
16
  * Facet by institution, year, publisher, data type, access, format
16
17
  * Facet by place, subject
17
18
  * Sort by relevance, year, publisher, title
@@ -19,44 +20,28 @@ More coming soon!
19
20
  * Detail map view for WMS features
20
21
  * Detail map view feature inspection
21
22
  * Slugs
22
- * MODS display
23
23
  * Results list map view of bounding boxes
24
24
  * WMS/WFS/WCS links
25
25
  * Download Shapefile
26
26
  * Download KML
27
27
  * Download Metadata (for Stanford)
28
-
29
- ## Features to port from alpha
30
-
31
- * Blacklight bookmarks and history
32
- * Facet pagination (more>> link)
33
- * Login for persistent bookmarks and history
28
+ * Built-in sample Solr 4.10 index
29
+ * Search history
34
30
 
35
31
  ## TODO
36
32
 
37
- * Refactoring to `lib/`
38
- * Test suites
39
- * Spatial search
40
- * Spatial relevancy
41
- * Download GeoTIFF
42
- * Clip to map view for download(?)
43
- * Download Metadata (for non-Stanford)
44
- * Facet by language, projection, collection (dummy data)
45
- * Citation and share buttons
46
- * Featured datasets and articles
47
- * geoblacklight-schema
48
- * FGDC-based conversion of external OGP records
49
- * MODS-based conversion for Stanford records
33
+ * See https://github.com/geoblacklight/geoblacklight/issues
34
+ * See https://github.com/geoblacklight/geoblacklight-schema/issues
50
35
 
51
36
  ## Development
52
37
 
53
- To install a development instance of Geoblacklight follow these instructions.
38
+ To install a development instance of GeoBlacklight follow these instructions.
54
39
 
55
40
  Clone the repository (using `--recurse`)
56
41
 
57
- git clone --recurse git@github.com:sul-dlss/geoblacklight.git
42
+ git clone --recurse git@github.com:geoblacklight/geoblacklight.git
58
43
 
59
- Download and configure `jetty`
44
+ Download and configure `jetty` to run Solr
60
45
 
61
46
  rake jetty:download jetty:unzip
62
47
  rake geoblacklight:configure_jetty
@@ -64,40 +49,53 @@ Download and configure `jetty`
64
49
  Create a test app (created at `/spec/internal`)
65
50
 
66
51
  rake engine_cart:generate
67
-
52
+
68
53
  Boot `jetty`
69
54
 
70
55
  rake jetty:start
71
-
56
+
72
57
  Boot GeoBlacklight test app
73
58
 
74
59
  cd spec/internal
75
60
  rake geoblacklight:solr:seed # to load sample documents into jetty Solr instance
76
61
  rails server
77
62
 
78
- ## Installation
63
+ Note that if you're using Rails with Spring enabled, we've found the the `rails generate` commands
64
+ will stall. The workaround is to kill the spring daemon process. You will will probably not need to run this generator regularly.
79
65
 
80
- Add this line to your application's `Gemfile`:
66
+ Run tests
81
67
 
82
- gem 'geoblacklight'
68
+ rake ci
83
69
 
84
- And then execute:
70
+ ## Installation
85
71
 
86
- $ bundle
72
+ To bootstrap a new GeoBlacklight Rails application
87
73
 
88
- Or install it yourself as:
74
+ $ rails new app-name -m https://raw.githubusercontent.com/geoblacklight/geoblacklight/master/template.rb
75
+
76
+ To install Solr (with jetty)
89
77
 
90
- $ gem install geoblacklight
78
+ $ cd app-name
79
+ $ rake jetty:download
80
+ $ rake jetty:unzip
81
+ $ rake geoblacklight:configure_jetty
82
+
91
83
 
92
84
  ## Usage
93
85
 
94
- 1. Populate Solr index with geoblacklight-schema documents
95
- 2. ...
86
+ For a non-development instance:
87
+
88
+ 1. Populate a Solr 4.7 index with geoblacklight-schema documents
89
+ 2. Configure your GeoBlacklight application's `config/solr.yml` to point to the Solr index
90
+ 3. Configure your `config/environments` and `app/controllers/catalog_controller.rb`
91
+ 4. `rails server` to run GeoBlacklight
96
92
 
97
93
  ## Contributing
98
94
 
99
- 1. Fork it ( http://github.com/`my-github-username`/geoblacklight/fork )
95
+ 1. Fork it ( http://github.com/my-github-username/geoblacklight/fork )
100
96
  2. Create your feature branch (`git checkout -b my-new-feature`)
101
97
  3. Commit your changes (`git commit -am 'Add some feature'`)
102
98
  4. Push to the branch (`git push origin my-new-feature`)
103
99
  5. Create new Pull Request
100
+
101
+ Also, if you wish to ask questions or participate further, email the [GeoBlacklight Working Group](https://groups.google.com/forum/#!forum/geoblacklight-working-group) at geoblacklight-working-group@googlegroups.com.
data/Rakefile CHANGED
@@ -1,12 +1,11 @@
1
1
  require "bundler/gem_tasks"
2
2
 
3
- BLACKLIGHT_JETTY_VERSION = '4.7.2'
4
- ZIP_URL = "https://github.com/drh-stanford/blacklight-jetty/archive/v#{BLACKLIGHT_JETTY_VERSION}.zip"
3
+ BLACKLIGHT_JETTY_VERSION = '4.10.0'
4
+ ZIP_URL = "https://github.com/projectblacklight/blacklight-jetty/archive/v#{BLACKLIGHT_JETTY_VERSION}.zip"
5
5
  APP_ROOT = File.dirname(__FILE__)
6
6
 
7
7
  require 'rspec/core/rake_task'
8
8
  require 'engine_cart/rake_task'
9
-
10
9
  require 'jettywrapper'
11
10
 
12
11
  task default: :ci
@@ -22,15 +21,16 @@ end
22
21
 
23
22
  desc "Execute Continuous Integration build"
24
23
  task :ci => ['engine_cart:generate', 'jetty:clean', 'geoblacklight:configure_jetty'] do
24
+ ENV['environment'] = "test"
25
+ jetty_params = Jettywrapper.load_config
26
+ jetty_params[:startup_wait]= 60
25
27
 
26
- require 'jettywrapper'
27
- jetty_params = Jettywrapper.load_config('test')
28
+ Jettywrapper.wrap(jetty_params) do
29
+ Rake::Task["fixtures"].invoke
28
30
 
29
- error = Jettywrapper.wrap(jetty_params) do
30
- Rake::Task['fixtures'].invoke
31
- Rake::Task['spec'].invoke
31
+ # run the tests
32
+ Rake::Task["spec"].invoke
32
33
  end
33
- raise "test failures: #{error}" if error
34
34
  end
35
35
 
36
36
 
Binary file
@@ -0,0 +1,117 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <!--
4
+ 2014-11-6: Created.
5
+ -->
6
+ <svg xmlns="http://www.w3.org/2000/svg">
7
+ <metadata>
8
+ Created by FontForge 20120731 at Thu Nov 6 23:02:22 2014
9
+ By Jack Reed
10
+ Created by Jack Reed with FontForge 2.0 (http://fontforge.sf.net)
11
+ </metadata>
12
+ <defs>
13
+ <font id="geoblacklight" horiz-adv-x="512" >
14
+ <font-face
15
+ font-family="geoblacklight"
16
+ font-weight="900"
17
+ font-stretch="normal"
18
+ units-per-em="512"
19
+ panose-1="2 0 10 9 0 0 0 0 0 0"
20
+ ascent="448"
21
+ descent="-64"
22
+ bbox="-0.378593 -82.7842 512.528 487.36"
23
+ underline-thickness="25.6"
24
+ underline-position="-51.2"
25
+ unicode-range="U+F101-F110"
26
+ />
27
+ <missing-glyph />
28
+ <glyph glyph-name="uniF10D" unicode="&#xf10d;"
29
+ d="M0 448zM437.024 373.024c48.3516 -48.3525 74.9756 -112.641 74.9756 -181.024s-26.624 -132.672 -74.9756 -181.024c-48.3525 -48.3516 -112.641 -74.9756 -181.024 -74.9756s-132.672 26.624 -181.024 74.9756c-48.3516 48.3525 -74.9756 112.641 -74.9756 181.024
30
+ s26.624 132.672 74.9756 181.024c48.3525 48.3516 112.641 74.9756 181.024 74.9756s132.672 -26.624 181.024 -74.9756zM414.384 33.5996c31.5361 31.5361 52.4961 70.8008 61.1357 113.536c-6.73535 -9.91992 -13.1836 -13.5996 -17.168 8.6084
31
+ c-4.11133 36.1914 -37.3594 13.0723 -58.2559 25.9355c-22 -14.832 -71.4561 28.832 -63.0557 -20.416c12.96 -22.208 70 29.7285 41.5684 -17.2637c-18.1445 -32.7998 -66.3203 -105.472 -60.0488 -143.136c0.78418 -54.8799 -56.0635 -11.4404 -75.6631 6.75195
32
+ c-13.1846 36.4639 -4.49609 100.191 -38.9443 118.048c-37.4082 1.63184 -69.5039 5.02441 -84 46.832c-8.71973 29.9199 9.28027 74.4482 41.3438 81.3281c46.9277 29.4873 63.6797 -34.5283 107.696 -35.7119c13.6641 14.3037 50.9121 18.8477 54 34.8799
33
+ c-28.8799 5.08789 36.6396 24.2715 -2.76855 35.1836c-21.7275 -2.55957 -35.7432 -22.5439 -24.1914 -39.4717c-42.1123 -9.82422 -43.4727 60.9443 -83.9521 38.624c-1.02441 -35.2959 -66.1123 -11.4404 -22.5117 -4.28809
34
+ c14.9756 6.54395 -24.4326 25.5039 -3.13672 22.0635c10.4648 0.576172 45.6641 12.9121 36.1445 21.2002c19.5996 12.1768 36.0801 -29.1514 55.2637 0.944336c13.8564 23.1357 -5.80762 27.4082 -23.168 15.6797c-9.79199 10.96 17.2803 34.6406 41.168 44.8643
35
+ c7.95215 3.4082 15.5684 5.26367 21.376 4.73633c12.0322 -13.8887 34.2725 -16.3047 35.4404 1.66406c-29.792 14.2715 -62.6406 21.8076 -96.6406 21.8076c-48.8154 0 -95.2314 -15.5039 -133.647 -44.1924c10.3203 -4.73535 16.1914 -10.624 6.24023 -18.1436
36
+ c-7.72852 -23.0244 -39.0889 -53.9365 -66.6084 -49.5684c-14.2881 -24.6396 -23.7119 -51.8076 -27.7275 -80.2715c23.0557 -7.63184 28.3672 -22.7207 23.4238 -27.7764c-11.7441 -10.2402 -18.96 -24.7676 -22.6885 -40.6562
37
+ c7.50391 -45.9199 29.0879 -88.2393 62.6406 -121.792c42.3037 -42.3037 98.5596 -65.5996 158.384 -65.5996s116.08 23.2959 158.384 65.5996h-0.0322266z" />
38
+ <glyph glyph-name="uniF107" unicode="&#xf107;"
39
+ d="M24.3184 346.672v77.0098h77.0098v-77.0098h-77.0098zM0 322.354h125.646v125.646h-125.646v-125.646zM410.671 346.672v77.0098h77.0117v-77.0098h-77.0117zM386.353 322.354h125.648v125.646h-125.648v-125.646zM24.3184 -39.6807v77.0117h77.0098v-77.0117h-77.0098z
40
+ M0 -63.999h125.646v125.648h-125.646v-125.648zM410.671 -39.6807v77.0098h77.0117v-77.0098h-77.0117zM386.353 -63.999h125.648v125.646h-125.648v-125.646zM113.487 409.495v-48.6367h285.024v48.6367h-285.024zM113.487 8.23633v-48.6367h285.024v48.6367h-285.024z
41
+ M424.859 49.4902h48.6367v285.022h-48.6367v-285.022zM38.5049 49.4902h48.6367v285.022h-48.6367v-285.022z" />
42
+ <glyph glyph-name="uniF109" unicode="&#xf109;"
43
+ d="M323.564 341.075c0 20.1901 -7.1429 37.4281 -21.4287 51.7139s-31.5241 21.4287 -51.7148 21.4287c-20.1901 0 -37.4281 -7.1429 -51.7139 -21.4287s-21.4287 -31.5238 -21.4287 -51.7139c0 -20.1908 7.1429 -37.429 21.4287 -51.7148
44
+ c14.2858 -14.2852 31.5238 -21.4277 51.7139 -21.4277c20.1908 0 37.429 7.14258 51.7148 21.4277c14.2858 14.2858 21.4287 31.5241 21.4287 51.7148zM396.707 341.075c0 -20.7617 -3.1429 -37.8092 -9.42871 -51.1426l-104 -221.144
45
+ c-3.04753 -6.28581 -7.57129 -11.238 -13.5713 -14.8564c-6 -3.61914 -12.4287 -5.42871 -19.2861 -5.42871c-6.85677 0 -13.2852 1.80957 -19.2852 5.42871c-6 3.61849 -10.4287 8.57064 -13.2861 14.8564l-104.285 221.144
46
+ c-6.28581 13.3333 -9.42871 30.3809 -9.42871 51.1426c0 40.3809 14.2858 74.8571 42.8574 103.429c28.571 28.571 63.0469 42.8564 103.428 42.8564c40.3815 0 74.8577 -14.2855 103.429 -42.8564c28.5716 -28.5716 42.8574 -63.0479 42.8574 -103.429z" />
47
+ <glyph glyph-name="uniF10A" unicode="&#xf10a;"
48
+ d="M0 448zM0 384h512v-416h-512v416zM480 0v352h-448v-352h448zM352 272c0 26.5117 21.4883 48 48 48s48 -21.4883 48 -48s-21.4883 -48 -48 -48s-48 21.4883 -48 48zM448 32h-384l96 256l128 -160l64 48z" />
49
+ <glyph glyph-name="uniF102" unicode="&#xf102;"
50
+ d="M92.2803 367.832l71.1113 70.6562h187.185l69.1436 -70.7207l-0.015625 -99.8477h-123.456v46.6396h-75.0078v-67.6875h135.527l62.9521 -60.7998v-183.864l-61.7998 -61.7119h-203.464l-62.04 62.5283v99.3438h133.392v-41.1602h75.9121v63.1123l-147.655 -0.0166016
51
+ l-61.7842 61.7998v181.729zM100.272 364.168v-174.848l56.9512 -56.9766s137.712 0 152.48 0.0078125v-79.5596c-12.9043 0 -79.4404 0 -92.3604 -0.0244141v41.168h-116.943v-87.6396l57.1279 -57.7842h196.783l56.9521 56.96v177.08l-58.2637 55.9121h-140.24
52
+ c0.0078125 12.6318 0.0078125 71.4883 0 84.1279h91.4727v-46.6396h107.031v88.168l-64.3115 65.9355h-180.488zM169.832 421.232h173.776l59.4561 -61.1602l-0.0166016 -76.4805h-90.5518v46.6406h-107.937l0.00878906 -100.601h144.976l53.5205 -51l-0.0166016 -170.296
53
+ l-52.0635 -52.1758h-190.088l-52.2324 53.0234v75.9199h100.479v-41.1514h108.824l0.0166016 96.0322h-157.312l-52.1201 52.1357v167.952zM287.544 162.936c0 -0.03125 -0.0634766 -0.167969 -0.328125 -0.463867c0.12793 0.152344 0.255859 0.320312 0.328125 0.463867z
54
+ M92.2803 367.832l71.1201 70.6562h187.176l69.1436 -70.7207l-0.015625 -99.8477h-123.464v46.6396h-75v-67.6875h135.527l62.9521 -60.7998v-183.864l-61.792 -61.7119h-203.472l-62.04 62.5283v99.3438h133.392v-41.1602h75.9199v63.1123l-147.663 -0.0166016
55
+ l-61.7842 61.7998v181.729zM100.264 364.168v-174.848l56.9521 -56.9766s137.72 0 152.488 0.0078125v-79.5596c-12.9121 0 -79.4404 0 -92.3604 -0.0244141v41.168h-116.943v-87.6396l57.1279 -57.7842h196.792l56.9434 56.96v177.08l-58.2559 55.9121h-140.24
56
+ c0.00878906 12.6318 0.00878906 71.4883 0 84.1279h91.4805v-46.6396h107.024v88.168l-64.3125 65.9355h-180.496zM169.832 421.232h173.768l59.4561 -61.1602l-0.015625 -76.4805h-90.5361v46.6406h-107.944l0.00878906 -100.601h144.976l53.5117 -51l-0.015625 -170.296
57
+ l-52.0557 -52.1758h-190.088l-52.2402 53.0234v75.9199h100.487v-41.1514h108.824l0.0166016 96.0322h-157.312l-52.1279 52.1357v167.952zM287.552 162.936c0 -0.03125 -0.0634766 -0.167969 -0.34375 -0.463867c0.143555 0.152344 0.272461 0.320312 0.34375 0.463867z
58
+ M92.2803 367.832l71.1113 70.6562h187.185l69.1436 -70.7207l-0.015625 -99.8477h-123.456v46.6396h-75.0078v-67.6875h135.527l62.9521 -60.7998v-183.864l-61.7998 -61.7119h-203.464l-62.04 62.5283v99.3438h133.392v-41.1602h75.9121v63.1123l-147.655 -0.0166016
59
+ l-61.7842 61.7998v181.729zM100.272 364.168v-174.848l56.9512 -56.9766s137.712 0 152.48 0.0078125v-79.5596c-12.9043 0 -79.4404 0 -92.3604 -0.0244141v41.168h-116.943v-87.6396l57.1279 -57.7842h196.783l56.9521 56.96v177.08l-58.2637 55.9121h-140.24
60
+ c0.0078125 12.6318 0.0078125 71.4883 0 84.1279h91.4727v-46.6396h107.031v88.168l-64.3115 65.9355h-180.488zM169.832 421.232h173.776l59.4561 -61.1602l-0.0166016 -76.4805h-90.5518v46.6406h-107.937l0.00878906 -100.601h144.976l53.5205 -51l-0.0166016 -170.296
61
+ l-52.0635 -52.1758h-190.088l-52.2324 53.0234v75.9199h100.479v-41.1514h108.824l0.0166016 96.0322h-157.312l-52.1201 52.1357v167.952zM287.544 162.936c0 -0.03125 -0.0634766 -0.167969 -0.328125 -0.463867c0.12793 0.152344 0.255859 0.320312 0.328125 0.463867z
62
+ " />
63
+ <glyph glyph-name="uniF106" unicode="&#xf106;"
64
+ d="M88.1523 256.52h41.7598l6.42383 -225.407h-53.7998l5.61621 225.407v0zM48.7842 23.0078h414.432v-29.0234h24.832v-28.9766h24.0801v-29.0078h-512.256v28.9922h24.0801v28.9922h24.832v29.0234v0zM484.824 319.456v0v-17.7285h-457.664v17.7285l228.824 108.424z
65
+ M71.2725 293.632h369.447v-29h-369.447v29v0zM381.272 256.52h41.7754l6.42383 -225.407h-53.8154zM283.56 256.52h41.7686l6.42383 -225.407h-53.8076l5.61523 225.407v0zM185.856 256.52h41.7676l6.42383 -225.424h-53.8076z" />
66
+ <glyph glyph-name="uniF110" unicode="&#xf110;"
67
+ d="M0 448zM0 352l160 64v-384l-160 -64v384zM352 352v-384l-160 53.3281v384zM512 416v-384l-128 -51.2002v384z" />
68
+ <glyph glyph-name="uniF103" unicode="&#xf103;"
69
+ d="M18.7842 429.216h216.285h216.285v-162.951c0 -215.741 -136.625 -302.743 -216.285 -349.049c-79.6611 46.3057 -216.285 133.308 -216.285 349.049v162.951zM120.218 383.598v-45.082h14.9609v-215.748h-14.9609v-45.082h77.2832v45.082h-14.9609v84.1934h105.057
70
+ v-84.1934h-14.959v-45.082h77.2822v45.082h-14.96v215.748h14.96v45.082h-77.2822v-45.082h14.96v-84.1934h-105.057v84.1934h14.96v45.082h-77.2832z" />
71
+ <glyph glyph-name="uniF101" unicode="&#xf101;"
72
+ d="M1.25195 41.0254c-4.97656 4.97461 2.71289 18.0205 6.08691 22.3428c6.2002 7.94727 15.5381 14.9893 23.8936 20.4805c16.4727 10.8281 31.7383 17.5146 50.7607 22.583c27.0195 7.19629 55.1641 8.02148 82.9746 7.99512
73
+ c83.8916 -0.0800781 134.174 -8.59375 208.279 -10.0967c5.99805 -0.12207 41.2158 -1.53613 50.4258 6.1543c-19.877 3.91602 -32.8477 9.20801 -43.0879 16.2041c-4.41211 3.01367 -14.6758 13.6514 -17.2363 18.6016
74
+ c-23.1631 -15.3789 -51.2861 -29.6953 -80.7256 -28.416c-13.4902 0.586914 -26.624 6.14453 -31.4023 14.0752c-10.0693 -8.7002 -23.5254 -12.4473 -33.458 -13.7305c-16.5205 -2.13477 -33.8115 2.01758 -46.1631 13.5977
75
+ c-1.65039 1.54785 -6.56641 7.30469 -7.65527 8.91992c-3.17871 -2.80957 -11.498 -7.91602 -13.1553 -8.81055c-31.1875 -16.8398 -70.5645 -19.9307 -102.027 -1.90723c-30.5244 17.4854 -39.2402 50.5215 -37.2949 83.7158
76
+ c4.51465 77.0439 59.0508 143.82 118.752 187.873c28.4229 20.9727 63.3506 40.1367 98.7021 45.6904c13.2139 2.07617 31.208 4.58301 43.1943 -3.04785c12.3125 -7.83887 15.7939 -22.4062 14.3389 -36.2812c-3.31738 -31.6201 -32.2158 -69.2051 -64.7568 -69.167
77
+ c-13.9932 0.0166016 -25.4971 10.6914 -21.8457 24.917c4.01465 15.6338 20.2715 18.8906 33.8965 22.7686c11.0146 3.13477 20.0498 9.01172 18.9199 21.998c-1.17285 13.4844 -24.4854 4.72656 -32.6768 0.630859c-28.7021 -14.3516 -48.5557 -38.8584 -67.5928 -64.2705
78
+ c-31.9336 -42.6299 -58.8389 -95.6533 -55.4658 -150.016c1.47461 -23.7559 21.7334 -48.5303 46.0264 -30.4521c12.415 9.2373 18.2637 25.7969 25.3594 38.9043c8.60352 15.8926 19.2598 30.0518 32.4668 42.4092c13.6396 12.7617 29.6016 22.7412 47.5996 28.0127
79
+ c7.43945 2.17969 15.7246 4.23047 23.5498 4.29395c16.4502 0.131836 15.2139 -6.78027 18.2422 -3.19629c4.16797 4.93164 13.6963 3.84082 28.0322 3.32812c14.8408 -0.530273 20.0527 -0.255859 22.6133 -6.91211c2.74219 -7.12793 -6.98633 -26.3389 -18.5176 -55.5518
80
+ c-10.8555 -27.498 -22.5684 -54.374 -14.8477 -58.3682c8.38867 -4.33691 21.1611 5.33008 28.4092 10.0518c8.03125 5.23145 12.0391 8.125 15.623 11.709c-2.20898 31.4502 1.46582 70.0625 13.252 99.4678c14.1094 35.1992 34.998 68.2988 61.7559 95.0918
81
+ c13.8896 13.9072 63.4883 51.2002 80.0674 33.998c7.93555 -8.2334 6.15625 -24.6201 4.7041 -34.8994c-2.09766 -14.8447 -19.3486 -58.5029 -44.8359 -100.986c-12.6338 -21.0576 -45.7383 -65.0244 -51.8828 -74.2402
82
+ c-1.36523 -16.043 6.85645 -34.5283 17.4082 -45.3975c12.2529 -12.6221 25.1777 -14.1582 40.3799 -20.5879c17.1729 -7.26465 16.1445 -19.9326 5.7666 -32.9004c-21.9473 -27.4189 -49.1885 -37.9961 -82.3252 -44.4746
83
+ c-38.3799 -7.50195 -85.5039 -4.0957 -123.89 -2.79883c-33.0039 1.11426 -70.8604 4.0498 -103.95 5.35938c-36.9941 1.46387 -77.8506 1.0918 -111.104 -4.60938c-11.9473 -2.04785 -21.9219 -4.96094 -32.085 -7.50879
84
+ c-4.64453 -1.16309 -19.2598 -6.78613 -23.498 -2.54688zM261.888 204.17c5.63184 12.2881 14.3359 33.0244 14.8486 39.168c0.435547 5.23438 -20.2012 0.859375 -39.6807 -34.2188c-5.49414 -9.89258 -16.1279 -43.0928 -4.60742 -45.9092
85
+ c11.5195 -2.81543 24.0371 29.1729 29.4395 40.96zM451.755 306.399c10.4111 18.3467 22.9297 44.7383 25.9414 53.6748c-5.14453 -3.04883 -20.5439 -20.9785 -31.0615 -37.6318c-12.2881 -19.4561 -27.8984 -54.6768 -27.3066 -66.0479
86
+ c4.78418 6.12305 22.5225 32.5518 32.4268 50.0049zM8.19043 47.7734c0.90625 2.98242 3.2627 7.5498 5.60938 10.5586c4.52148 5.7959 11.9014 12.0781 21.9326 18.6719c15.4697 10.168 29.9355 16.6025 48.3701 21.5117c26.7402 7.12305 55.084 7.7207 79.5498 7.7207
87
+ l1.30664 -0.00292969c32.5635 -0.0292969 102.191 -4.13379 153.03 -7.13184c26.6807 -1.56934 47.7539 -2.81348 55.0947 -2.96289l1.3125 -0.0332031c2.14844 -0.0546875 5.74121 -0.148438 10.0498 -0.148438c31.0234 0 41.6162 4.85645 46.4004 7.60352
88
+ c5.20605 2.98633 10.667 7.25293 10.2402 10.2393c-0.621094 4.34961 -11.5186 4.01172 -15.6006 4.67285c-16.2314 2.62793 -30.2236 9.06641 -40.2783 16.1699c-11.5205 8.13965 -18.7764 22.5244 -18.7764 22.5244l-7.61426 -5.05469
89
+ c-27.876 -18.5059 -50.915 -27.126 -72.5049 -27.1279c-1.1123 0 -2.23438 0.0234375 -3.33594 0.0712891c-12.4365 0.540039 -22.0293 5.61426 -24.7383 10.1152l-5.01562 8.33105l-7.3584 -6.35547c-9.87402 -8.53027 -23.6758 -11.0957 -29.1523 -11.8037
90
+ c-2.41504 -0.314453 -4.86328 -0.47168 -7.27734 -0.47168c-12.5879 0 -24.0352 4.2334 -32.2344 11.9209c-1.20898 1.13281 -5.66797 6.36523 -6.46973 7.53027l-5.24316 7.61621l-6.96777 -6.06445c-2.4502 -2.16504 -10.0859 -6.91211 -11.624 -7.74316
91
+ c-15.8809 -8.57422 -33.4443 -13.1084 -50.7881 -13.1084c-15.6289 0 -30.5928 3.83789 -43.2754 11.1016c-30.1055 17.2471 -34.666 50.9189 -33.1924 76.1289c2.0166 34.417 14.5586 68.7969 37.2764 102.182c19.5889 28.7861 46.6162 56.3037 78.1631 79.5801
92
+ c22.9746 16.9531 58.127 38.3799 95.1094 44.1895c6.50586 1.02246 13.4199 2.01953 20.1377 2.01953c7.59277 0 13.2812 -1.26953 17.3867 -3.88574c11.0742 -7.05176 11.3896 -20.8916 10.5908 -28.5156c-2.93848 -28.002 -28.8223 -61.8262 -56.5605 -61.8281
93
+ c-5.12695 0.00390625 -9.70703 2 -12.29 5.33301c-2.0293 2.62012 -2.5918 5.76855 -1.66992 9.35547c2.34766 9.14648 10.9668 12.1455 24.8838 15.9971c1.11914 0.308594 2.22852 0.616211 3.32031 0.927734c22.1816 6.3125 25.749 20.1182 24.8379 30.5869
94
+ c-0.618164 7.10938 -5.62012 14.707 -17.8057 14.707c-11.4463 0 -25.1699 -6.69531 -26.6963 -7.45801c-30.3135 -15.1562 -50.6377 -40.1934 -70.4863 -66.6885c-40.8926 -54.5898 -60.0977 -106.883 -57.0859 -155.434
95
+ c1.32422 -21.332 16.0664 -44.3535 37.5771 -44.3535c7.28809 0 14.5273 2.63574 21.5146 7.83691c11.2207 8.3457 17.5547 21.2539 23.1465 32.6396c1.54883 3.15527 3.0127 6.1377 4.52637 8.9375c8.45605 15.6162 18.5078 29.5967 30.8174 41.1143
96
+ c13.5811 12.7061 27.8506 20.8252 43.5195 25.9414c8.36328 2.73047 15.8643 3.9043 25.0889 3.75488c8.69531 -0.140625 13.3115 -5.63184 15.3594 -9.21582c1.53613 2.98633 3.9248 8.27637 4.86426 9.04492c0.861328 0.704102 15.8096 0.634766 20.4795 0.426758
97
+ c3.84082 -0.170898 15.7227 -0.114258 17.1523 -1.66406c1.68555 -1.83008 -3.07227 -11.7764 -8.34863 -25.916c-2.44922 -6.56152 -6.05078 -14.5049 -9.79492 -24.2705c-1.45801 -3.80078 -2.94336 -7.58691 -4.39551 -11.2969
98
+ c-11.9102 -30.3779 -19.7773 -50.4482 -6.56836 -57.2803c2.5791 -1.33398 5.4502 -2.00977 8.54004 -2.00977c9.44531 0 18.915 6.33594 25.8281 10.9619c0.808594 0.538086 1.57031 1.04883 2.28027 1.5127c8.09277 5.27344 12.6934 8.5293 16.9414 12.7793
99
+ l2.64355 2.63965l-0.262695 3.72461c-2.36816 33.6992 2.49512 70.4238 12.6865 95.8486c14.1592 35.3262 34.8896 67.2598 59.9463 92.3486c12.5625 12.5801 44.1123 35.4258 61.4473 35.8281c14.6768 0.34082 10.5518 -25.5029 9.21582 -31.5732
100
+ c-2.90137 -13.1826 -18.3545 -54.1465 -43.5479 -96.1367c-8.51074 -14.1846 -27.0498 -39.7314 -39.3174 -56.6377c-5.78223 -7.96973 -10.3506 -14.2646 -12.3564 -17.2744l-1.16699 -1.75l-0.179688 -2.09766c-1.70117 -20.0166 8.66504 -40.4365 19.6924 -51.7998
101
+ c10.3418 -10.6533 21.292 -14.502 31.8818 -18.2246c3.62891 -1.27734 7.38184 -2.5957 11.1836 -4.20312c3.26465 -1.38281 7.32422 -3.68848 8.12305 -6.84082c0.789062 -3.11328 -1.2373 -7.99512 -5.55859 -13.3936
102
+ c-22.0186 -27.5117 -50.2617 -36.2305 -77.5049 -41.5537c-15.668 -3.06152 -34.7139 -4.54883 -58.2266 -4.55078c-15.8242 0 -31.5947 0.635742 -46.8438 1.25c-5.80176 0.234375 -11.4766 0.461914 -16.9707 0.649414
103
+ c-17.4834 0.589844 -36.668 1.71387 -55.2217 2.80078c-16.293 0.955078 -33.1396 1.94238 -48.6797 2.55762c-12.3154 0.489258 -24.1924 0.734375 -35.2998 0.734375c-30.3203 0 -56.3994 -1.83691 -77.5127 -5.45508
104
+ c-9.53418 -1.63574 -17.7725 -3.77637 -25.7402 -5.84766c-2.32422 -0.606445 -4.63574 -1.20801 -6.95508 -1.78809c-1.00977 -0.251953 -2.22754 -0.625 -3.63867 -1.05371c-2.92188 -0.890625 -7.50684 -2.28613 -10.9258 -2.69238v0zM273.92 252.938
105
+ c-8.32031 -0.255859 -28.1602 -10.4961 -44.0244 -39.8398c-3.70215 -6.84863 -15.1787 -35.332 -8.96094 -49.5508c1.87891 -4.29785 5.27734 -7.24512 9.56934 -8.29395c1.1084 -0.274414 2.25195 -0.410156 3.39258 -0.410156
106
+ c13.9941 -0.00195312 23.7949 19.5781 33.4238 41.3965c0.751953 1.70117 1.42871 3.23145 2.01855 4.5166c2.46387 5.37988 12.8574 29.3652 14.9102 38.3994c1.27734 5.63184 1.70312 14.1514 -10.3291 13.7822zM485.547 371.765
107
+ c-3.27734 1.80762 -12.0264 -4.64355 -12.0264 -4.64355c-16.7539 -13.3037 -29.3457 -29.7861 -40.1973 -48.7754c-28.6719 -50.1768 -26.0273 -89.6006 -26.0273 -89.6006s14.957 17.0264 18.4854 22.6035c4.81055 7.60449 22.9131 33.0605 33.0986 51.0068
108
+ c10.9199 19.2432 23.4678 45.876 26.5791 55.0996c0 0 5.03711 11.5791 0.0878906 14.3096z" />
109
+ <glyph glyph-name="uniF108" unicode="&#xf108;"
110
+ d="M410.671 346.672v77.0098h77.0117v-77.0098h-77.0117zM386.353 322.354h125.648v125.646h-125.648v-125.646zM24.3184 -39.6807v77.0117h77.0098v-77.0117h-77.0098zM0 -63.999h125.646v125.648h-125.646v-125.648zM96.291 66.6865l34.3926 -34.3926l285.022 285.022
111
+ l-34.3926 34.3926z" />
112
+ <glyph glyph-name="uniF104" unicode="&#xf104;"
113
+ d="M107.952 448h-107.952v-512h107.952v512zM283.759 448h-107.951v-348.53h107.951v348.53zM459.566 448h-107.952v-512h107.952v512z" />
114
+ <glyph glyph-name="uniF105" unicode="&#xf105;"
115
+ d="M73.3057 366.146v-116.948h-73.3057v198.802h458.019v-198.802h-72.0498v116.314h-97.7275v-357.704h78.6797v-71.8086h-276.963v71.8086h78.6846v358.338h-95.3369z" />
116
+ </font>
117
+ </defs></svg>
Binary file
Binary file
Binary file
@@ -1,2 +1,3 @@
1
1
  //= require leaflet
2
+ //= require native.history
2
3
  //= require_tree .
@@ -1,4 +1,88 @@
1
- console.log('DEBUG: Inside geoblacklight/geoblacklight.js')
1
+ !function(global) {
2
+ 'use strict';
2
3
 
3
- "use strict";
4
+ /**
5
+ * Convert bounding box string to Leaflet LatLngBounds.
6
+ * @param {String} bbox Space-separated string of sw-lng sw-lat ne-lng ne-lat
7
+ * @return {L.LatLngBounds} Converted Leaflet LatLngBounds object
8
+ */
9
+ L.bboxToBounds = function(bbox) {
10
+ bbox = bbox.split(' ');
11
+ if (bbox.length === 4) {
12
+ return L.latLngBounds([[bbox[1], bbox[0]], [bbox[3], bbox[2]]]);
13
+ } else {
14
+ return null;
15
+ }
16
+ };
4
17
 
18
+ var GeoBlacklight = L.Class.extend({
19
+
20
+ statics: {
21
+ __version__: '0.0.1',
22
+
23
+ debounce: function(fn, delay) {
24
+ var timeout = null;
25
+ return function() {
26
+ var args = arguments, _this = this;
27
+ clearTimeout(timeout);
28
+ timeout = setTimeout(function() {
29
+ fn.apply(_this, args);
30
+ }, delay);
31
+ };
32
+ }
33
+ },
34
+
35
+ initialize: function(el) {
36
+ var data = $(el).data(),
37
+ basemap, map;
38
+
39
+ basemap = L.tileLayer(
40
+ 'http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png', {
41
+ attribution: '&copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, Tiles Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png">',
42
+ maxZoom: 18,
43
+ worldCopyJump: true,
44
+ subdomains: '1234' // see http://developer.mapquest.com/web/products/open/map
45
+ }
46
+ );
47
+
48
+ this.overlay = L.layerGroup();
49
+
50
+ map = L.map(el);
51
+ this.map = map;
52
+ map.addLayer(basemap);
53
+ map.addLayer(this.overlay);
54
+
55
+ if (typeof data['mapBbox'] === "string") {
56
+ map.fitBounds(L.bboxToBounds(data.mapBbox));
57
+ } else {
58
+ map.setView([0,0], 2);
59
+ }
60
+ },
61
+
62
+ /**
63
+ * Add a bounding box overlay to map.
64
+ * @param {L.LatLngBounds} bounds Leaflet LatLngBounds
65
+ */
66
+ addBoundsOverlay: function(bounds) {
67
+ if (bounds instanceof L.LatLngBounds) {
68
+ this.overlay.addLayer(L.polygon([
69
+ bounds.getSouthWest(),
70
+ bounds.getSouthEast(),
71
+ bounds.getNorthEast(),
72
+ bounds.getNorthWest()
73
+ ]));
74
+ }
75
+ },
76
+
77
+ /**
78
+ * Remove bounding box overlay from map.
79
+ */
80
+ removeBoundsOverlay: function() {
81
+ this.overlay.clearLayers();
82
+ }
83
+
84
+ });
85
+
86
+ global.GeoBlacklight = GeoBlacklight;
87
+
88
+ }(this);