blacklight_heatmaps 1.3.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/app/assets/javascripts/blacklight_heatmaps/default.esm.js +2000 -0
- data/app/assets/javascripts/blacklight_heatmaps/default.esm.js.map +1 -0
- data/app/assets/javascripts/blacklight_heatmaps/default.js +2006 -8
- data/app/assets/javascripts/blacklight_heatmaps/default.js.map +1 -0
- data/app/{assets/javascripts/blacklight_heatmaps → javascript}/basemaps.js +4 -2
- data/app/javascript/blacklight_heatmaps.js +42 -0
- data/app/javascript/icons.js +5 -0
- data/app/javascript/viewers/index.js +76 -0
- data/app/javascript/viewers/show.js +24 -0
- data/lib/blacklight_heatmaps/version.rb +1 -1
- data/lib/generators/blacklight_heatmaps/install_generator.rb +2 -0
- data/spec/examples.txt +31 -0
- data/spec/features/configurable_basemap_spec.rb +1 -2
- data/spec/features/index_page_map_spec.rb +1 -1
- data/spec/features/show_page_map_spec.rb +1 -1
- data/spec/spec_helper.rb +0 -2
- data/vendor/assets/javascripts/geostats.js +511 -284
- data/vendor/assets/javascripts/leaflet_solr_heatmap.js +6 -4
- metadata +13 -9
- data/app/assets/javascripts/blacklight_heatmaps/blacklight_heatmaps.js +0 -18
- data/app/assets/javascripts/blacklight_heatmaps/icons.js +0 -3
- data/app/assets/javascripts/blacklight_heatmaps/viewers/index.js +0 -91
- data/app/assets/javascripts/blacklight_heatmaps/viewers/show.js +0 -39
- data/app/assets/javascripts/index.js +0 -8
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"default.js","sources":["../../../../vendor/assets/javascripts/geostats.js","../../../../vendor/assets/javascripts/leaflet_solr_heatmap.js","../../../javascript/basemaps.js","../../../javascript/icons.js","../../../javascript/viewers/index.js","../../../javascript/viewers/show.js","../../../javascript/blacklight_heatmaps.js"],"sourcesContent":["/**\n* geostats() is a tiny and standalone javascript library for classification\n* Project page - https://github.com/simogeo/geostats\n* Copyright (c) 2011 Simon Georget, http://www.intermezzo-coop.eu\n* Licensed under the MIT license\n*/\n\n\n(function (definition) {\n // This file will function properly as a <script> tag, or a module\n // using CommonJS and NodeJS or RequireJS module formats.\n\n // CommonJS\n if (typeof exports === \"object\") {\n module.exports = definition();\n\n // RequireJS\n } else if (typeof define === \"function\" && define.amd) {\n define(definition);\n\n // <script>\n } else {\n geostats = definition();\n }\n\n})(function () {\n\nvar isInt = function(n) {\n return typeof n === 'number' && parseFloat(n) == parseInt(n, 10) && !isNaN(n);\n} // 6 characters\n\nvar _t = function(str) {\n\treturn str;\n};\n\n//taking from http://stackoverflow.com/questions/18082/validate-decimal-numbers-in-javascript-isnumeric\nvar isNumber = function(n) {\n\t return !isNaN(parseFloat(n)) && isFinite(n);\n}\n\n\n\n//indexOf polyfill\n// from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function (searchElement, fromIndex) {\n if ( this === undefined || this === null ) {\n throw new TypeError( '\"this\" is null or not defined' );\n }\n\n var length = this.length >>> 0; // Hack to convert object.length to a UInt32\n\n fromIndex = +fromIndex || 0;\n\n if (Math.abs(fromIndex) === Infinity) {\n fromIndex = 0;\n }\n\n if (fromIndex < 0) {\n fromIndex += length;\n if (fromIndex < 0) {\n fromIndex = 0;\n }\n }\n\n for (;fromIndex < length; fromIndex++) {\n if (this[fromIndex] === searchElement) {\n return fromIndex;\n }\n }\n\n return -1;\n };\n }\n\nvar geostats = function(a) {\n\n\tthis.objectID = '';\n\tthis.separator = ' - ';\n\tthis.legendSeparator = this.separator;\n\tthis.method = '';\n\tthis.precision = 0;\n\tthis.precisionflag = 'auto';\n\tthis.roundlength \t= 2; // Number of decimals, round values\n\tthis.is_uniqueValues = false;\n\tthis.debug = false;\n\tthis.silent = false;\n\n\tthis.bounds = Array();\n\tthis.ranges = Array();\n\tthis.inner_ranges = null;\n\tthis.colors = Array();\n\tthis.counter = Array();\n\n\t// statistics information\n\tthis.stat_sorted\t= null;\n\tthis.stat_mean \t\t= null;\n\tthis.stat_median \t= null;\n\tthis.stat_sum \t\t= null;\n\tthis.stat_max \t\t= null;\n\tthis.stat_min \t\t= null;\n\tthis.stat_pop \t\t= null;\n\tthis.stat_variance\t= null;\n\tthis.stat_stddev\t= null;\n\tthis.stat_cov\t\t= null;\n\n\n\t/**\n\t * logging method\n\t */\n\tthis.log = function(msg, force) {\n\n\t\tif(this.debug == true || force != null)\n\t\t\tconsole.log(this.objectID + \"(object id) :: \" + msg);\n\n\t};\n\n\t/**\n\t * Set bounds\n\t */\n\tthis.setBounds = function(a) {\n\n\t\tthis.log('Setting bounds (' + a.length + ') : ' + a.join());\n\n\t\tthis.bounds = Array() // init empty array to prevent bug when calling classification after another with less items (sample getQuantile(6) and getQuantile(4))\n\n\t\tthis.bounds = a;\n\t\t//this.bounds = this.decimalFormat(a);\n\n\t};\n\n\t/**\n\t * Set a new serie\n\t */\n\tthis.setSerie = function(a) {\n\n\t\tthis.log('Setting serie (' + a.length + ') : ' + a.join());\n\n\t\tthis.serie = Array() // init empty array to prevent bug when calling classification after another with less items (sample getQuantile(6) and getQuantile(4))\n\t\tthis.serie = a;\n\n\t\t//reset statistics after changing serie\n\t this.resetStatistics();\n\n\t\tthis.setPrecision();\n\n\t};\n\n\t/**\n\t * Set colors\n\t */\n\tthis.setColors = function(colors) {\n\n\t\tthis.log('Setting color ramp (' + colors.length + ') : ' + colors.join());\n\n\t\tthis.colors = colors;\n\n\t};\n\n\t/**\n\t * Get feature count\n\t * With bounds array(0, 0.75, 1.5, 2.25, 3);\n\t * should populate this.counter with 5 keys\n\t * and increment counters for each key\n\t */\n\tthis.doCount = function() {\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\n\t\tvar tmp = this.sorted();\n\n\t\tthis.counter = new Array();\n\n\t\t// we init counter with 0 value\n\t\tif(this.is_uniqueValues == true) {\n\t\t\tfor (var i = 0; i < this.bounds.length; i++) {\n\t\t\t\tthis.counter[i]= 0;\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var i = 0; i < this.bounds.length -1; i++) {\n\t\t\t\tthis.counter[i]= 0;\n\t\t\t}\n\t\t}\n\n\t\tfor (var j=0; j < tmp.length; j++) {\n\n\t\t\t// get current class for value to increment the counter\n\t\t\tvar cclass = this.getClass(tmp[j]);\n\t\t\tthis.counter[cclass]++;\n\n\t\t}\n\n\t};\n\n\t/**\n\t * Set decimal precision according to user input\n\t * or automatcally determined according\n\t * to the given serie.\n\t */\n\tthis.setPrecision = function(decimals) {\n\n\t\t// only when called from user\n\t\tif(typeof decimals !== \"undefined\") {\n\t\t\tthis.precisionflag = 'manual';\n\t\t\tthis.precision = decimals;\n\t\t}\n\n\t\t// we calculate the maximal decimal length on given serie\n\t\tif(this.precisionflag == 'auto') {\n\n\t\t\tfor (var i = 0; i < this.serie.length; i++) {\n\n\t\t\t\t// check if the given value is a number and a float\n\t\t\t\tif (!isNaN((this.serie[i]+\"\")) && (this.serie[i]+\"\").toString().indexOf('.') != -1) {\n\t\t\t\t\tvar precision = (this.serie[i] + \"\").split(\".\")[1].length;\n\t\t\t\t} else {\n\t\t\t\t\tvar precision = 0;\n\t\t\t\t}\n\n\t\t\t\tif(precision > this.precision) {\n\t\t\t\t\tthis.precision = precision;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\tif(this.precision > 20) {\n\t\t\t// prevent \"Uncaught RangeError: toFixed() digits argument must be between 0 and 20\" bug. See https://github.com/simogeo/geostats/issues/34\n\t\t\tthis.log('this.precision value (' + this.precision + ') is greater than max value. Automatic set-up to 20 to prevent \"Uncaught RangeError: toFixed()\" when calling decimalFormat() method.');\n\t\t\tthis.precision = 20;\n\t\t}\n\n\t\tthis.log('Calling setPrecision(). Mode : ' + this.precisionflag + ' - Decimals : '+ this.precision);\n\n\t\tthis.serie = this.decimalFormat(this.serie);\n\n\t};\n\n\t/**\n\t * Format array numbers regarding to precision\n\t */\n\tthis.decimalFormat = function(a) {\n\n\t\tvar b = new Array();\n\n\t\tfor (var i = 0; i < a.length; i++) {\n\t\t\t// check if the given value is a number\n\t\t\tif (isNumber(a[i])) {\n\t\t\t\tb[i] = parseFloat(parseFloat(a[i]).toFixed(this.precision));\n\t\t\t} else {\n\t\t\t\tb[i] = a[i];\n\t\t\t}\n\t\t}\n\n\t\treturn b;\n\t}\n\n\t/**\n\t * Transform a bounds array to a range array the following array : array(0,\n\t * 0.75, 1.5, 2.25, 3); becomes : array('0-0.75', '0.75-1.5', '1.5-2.25',\n\t * '2.25-3');\n\t */\n\tthis.setRanges = function() {\n\n\t\tthis.ranges = Array(); // init empty array to prevent bug when calling classification after another with less items (sample getQuantile(6) and getQuantile(4))\n\n\t\tfor (var i = 0; i < (this.bounds.length - 1); i++) {\n\t\t\tthis.ranges[i] = this.bounds[i] + this.separator + this.bounds[i + 1];\n\t\t}\n\t};\n\n\t/** return min value */\n\tthis.min = function(exclude = []) {\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tif(!exclude.includes(this.serie[0])) this.stat_min = this.serie[0];\n\t\telse this.stat_min = 999999999999;\n\n\n\t\tfor (var i = 0; i < this.pop(); i++) {\n\t\t\tif (this.serie[i] < this.stat_min && !exclude.includes(this.serie[i])) {\n\t\t\t\tthis.stat_min = this.serie[i];\n\t\t\t}\n\t\t}\n\n\t\treturn this.stat_min;\n\t};\n\n\t/** return max value */\n\tthis.max = function(exclude = []) {\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tif(!exclude.includes(this.serie[0])) this.stat_max = this.serie[0];\n\t\telse this.stat_max = -999999999999;\n\n\t\tfor (var i = 0; i < this.pop(); i++) {\n\t\t\tif (this.serie[i] > this.stat_max && !exclude.includes(this.serie[i])) {\n\t\t\t\tthis.stat_max = this.serie[i];\n\t\t\t}\n\t\t}\n\n\t\treturn this.stat_max;\n\t};\n\n\t/** return sum value */\n\tthis.sum = function() {\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tif (this.stat_sum == null) {\n\n\t\t\tthis.stat_sum = 0;\n\t\t\tfor (var i = 0; i < this.pop(); i++) {\n\t\t\t\tthis.stat_sum += parseFloat(this.serie[i]);\n\t\t\t}\n\n\t\t}\n\n\t\treturn this.stat_sum;\n\t};\n\n\t/** return population number */\n\tthis.pop = function() {\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tif (this.stat_pop == null) {\n\n\t\t\tthis.stat_pop = this.serie.length;\n\n\t\t}\n\n\t\treturn this.stat_pop;\n\t};\n\n\t/** return mean value */\n\tthis.mean = function() {\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tif (this.stat_mean == null) {\n\n\t\t\tthis.stat_mean = parseFloat(this.sum() / this.pop());\n\n\t\t}\n\n\t\treturn this.stat_mean;\n\t};\n\n\t/** return median value */\n\tthis.median = function() {\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tif (this.stat_median == null) {\n\n\t\t\tthis.stat_median = 0;\n\t\t\tvar tmp = this.sorted();\n\n\t\t\t// serie pop is odd\n\t\t\tif (tmp.length % 2) {\n\t\t\t\tthis.stat_median = parseFloat(tmp[(Math.ceil(tmp.length / 2) - 1)]);\n\n\t\t\t// serie pop is even\n\t\t\t} else {\n\t\t\t\tthis.stat_median = ( parseFloat(tmp[((tmp.length / 2) - 1)]) + parseFloat(tmp[(tmp.length / 2)]) ) / 2;\n\t\t\t}\n\n\t\t}\n\n\t\treturn this.stat_median;\n\t};\n\n\t/** return variance value */\n\tthis.variance = function() {\n\n\t\tvar round = (typeof round === \"undefined\") ? true : false;\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tif (this.stat_variance == null) {\n\n\t\t\tvar tmp = 0, serie_mean = this.mean();\n\t\t\tfor (var i = 0; i < this.pop(); i++) {\n\t\t\t\ttmp += Math.pow( (this.serie[i] - serie_mean), 2 );\n\t\t\t}\n\n\t\t\tthis.stat_variance = tmp / this.pop();\n\n\t\t\tif(round == true) {\n\t\t\t\tthis.stat_variance = Math.round(this.stat_variance * Math.pow(10,this.roundlength) )/ Math.pow(10,this.roundlength);\n\t\t\t}\n\n\t\t}\n\n\t\treturn this.stat_variance;\n\t};\n\n\t/** return standard deviation value */\n\tthis.stddev = function(round) {\n\n\t\tvar round = (typeof round === \"undefined\") ? true : false;\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tif (this.stat_stddev == null) {\n\n\t\t\tthis.stat_stddev = Math.sqrt(this.variance());\n\n\t\t\tif(round == true) {\n\t\t\t\tthis.stat_stddev = Math.round(this.stat_stddev * Math.pow(10,this.roundlength) )/ Math.pow(10,this.roundlength);\n\t\t\t}\n\n\t\t}\n\n\t\treturn this.stat_stddev;\n\t};\n\n\t/** coefficient of variation - measure of dispersion */\n\tthis.cov = function(round) {\n\n\t\tvar round = (typeof round === \"undefined\") ? true : false;\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tif (this.stat_cov == null) {\n\n\t\t\tthis.stat_cov = this.stddev() / this.mean();\n\n\t\t\tif(round == true) {\n\t\t\t\tthis.stat_cov = Math.round(this.stat_cov * Math.pow(10,this.roundlength) )/ Math.pow(10,this.roundlength);\n\t\t\t}\n\n\t\t}\n\n\t\treturn this.stat_cov;\n\t};\n\n\t/** reset all attributes after setting a new serie */\n\tthis.resetStatistics = function() {\n\t this.stat_sorted = null;\n\t this.stat_mean = null;\n\t this.stat_median = null;\n\t this.stat_sum = null;\n\t this.stat_max = null;\n\t this.stat_min = null;\n\t this.stat_pop = null;\n\t this.stat_variance = null;\n\t this.stat_stddev = null;\n\t this.stat_cov = null;\n\t}\n\n\t/** data test */\n\tthis._nodata = function() {\n\t\tif (this.serie.length == 0) {\n\n\t\t\tif(this.silent) this.log(\"[silent mode] Error. You should first enter a serie!\", true);\n\t\t\telse throw new TypeError(\"Error. You should first enter a serie!\");\n\t\t\treturn 1;\n\t\t} else\n\t\t\treturn 0;\n\n\t};\n\n\t/** data test */\n\tthis._classificationCheck = function(nbClass) {\n\n\t\tif(nbClass >= this.pop()) {\n\t\t\tvar errnum ='Error. ' + nbClass + ' classes are defined for only ' + this.pop() + ' values in serie ! For the current serie, no more than ' + (this.pop() - 1 ) + ' classes can be defined.';\n\n\t\t\tif(this.silent) this.log(errnum, true);\n\t\t\telse {\n\t\t\t\talert(errnum);\n\t\t\t\tthrow new TypeError(errnum);\n\t\t\t}\n\n\t\t}\n\n\t};\n\n\t/** ensure nbClass is an integer */\n\tthis._nbClassInt = function(nbClass) {\n\n\t\tvar nbclassTmp = parseInt(nbClass, 10);\n\t\tif (isNaN(nbclassTmp)) {\n\t\t\tif(this.silent) this.log(\"[silent mode] '\" + nbclassTmp + \"' is not a valid integer. Enable to set class number.\", true);\n\t\t\telse throw new TypeError(\"'\" + nbclassTmp + \"' is not a valid integer. Enable to set class number.\");\n\t\t} else {\n\t\t\treturn nbclassTmp;\n\t\t}\n\n\t};\n\n\t/** check if the serie contains negative value */\n\tthis._hasNegativeValue = function() {\n\n\t\tfor (var i = 0; i < this.serie.length; i++) {\n\t \tif(this.serie[i] < 0)\n\t \t\treturn true;\n\t }\n\n\t\treturn false;\n\t};\n\n\t/** check if the serie contains zero value */\n\tthis._hasZeroValue = function() {\n\n\t\tfor (var i = 0; i < this.serie.length; i++) {\n\t \tif(parseFloat(this.serie[i]) === 0)\n\t \t\treturn true;\n\t }\n\n\t\treturn false;\n\t};\n\n\t/** return sorted values (as array) */\n\tthis.sorted = function() {\n\n\t\tif (this.stat_sorted == null) {\n\n\t\t\tif(this.is_uniqueValues == false) {\n\t\t\t\tthis.stat_sorted = this.serie.sort(function(a, b) {\n\t\t\t\t\treturn a - b;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.stat_sorted = this.serie.sort(function(a,b){\n\t\t\t\t\tvar nameA=a.toString().toLowerCase(), nameB=b.toString().toLowerCase();\n\t\t\t\t if(nameA < nameB) return -1;\n\t\t\t\t if(nameA > nameB) return 1;\n\t\t\t\t return 0;\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\treturn this.stat_sorted;\n\n\t};\n\n\t/** return all info */\n\tthis.info = function() {\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tvar content = '';\n\t\tcontent += _t('Population') + ' : ' + this.pop() + ' - [' + _t('Min')\n\t\t\t\t+ ' : ' + this.min() + ' | ' + _t('Max') + ' : ' + this.max()\n\t\t\t\t+ ']' + \"\\n\";\n\t\tcontent += _t('Mean') + ' : ' + this.mean() + ' - ' + _t('Median')\t+ ' : ' + this.median() + \"\\n\";\n\t\tcontent += _t('Variance') + ' : ' + this.variance() + ' - ' + _t('Standard deviation')\t+ ' : ' + this.stddev()\n\t\t\t\t+ ' - ' + _t('Coefficient of variation')\t+ ' : ' + this.cov() + \"\\n\";\n\n\t\treturn content;\n\t};\n\n\t/**\n\t * Set Manual classification Return an array with bounds : ie array(0,\n\t * 0.75, 1.5, 2.25, 3);\n\t * Set ranges and prepare data for displaying legend\n\t *\n\t */\n\tthis.setClassManually = function(array) {\n\n\t\tif (this._nodata())\n\t return;\n\n\t if(array[0] !== this.min() || array[array.length-1] !== this.max()) {\n\t \tif(this.silent) this.log(\"[silent mode] \" + t('Given bounds may not be correct! please check your input.\\nMin value : ' + this.min() + ' / Max value : ' + this.max()), true);\n\t\t\telse throw new TypeError(_t('Given bounds may not be correct! please check your input.\\nMin value : ' + this.min() + ' / Max value : ' + this.max()));\n\t \treturn;\n\t }\n\n\t this.setBounds(array);\n\t this.setRanges();\n\n\t // we specify the classification method\n\t this.method = _t('manual classification') + ' (' + (array.length -1) + ' ' + _t('classes') + ')';\n\n\t return this.bounds;\n\t};\n\n\t/**\n\t * Equal intervals classification Return an array with bounds : ie array(0,\n\t * 0.75, 1.5, 2.25, 3);\n\t */\n\tthis.getClassEqInterval = function(nbClass, forceMin, forceMax) {\n\n\t\tvar nbClass = this._nbClassInt(nbClass); // ensure nbClass is an integer\n\n\t\tif (this._nodata())\n\t return;\n\n\t\tvar tmpMin = (typeof forceMin === \"undefined\") ? this.min() : forceMin;\n\t\tvar tmpMax = (typeof forceMax === \"undefined\") ? this.max() : forceMax;\n\n\t var a = Array();\n\t var val = tmpMin;\n\t var interval = (tmpMax - tmpMin) / nbClass;\n\n\t for (var i = 0; i <= nbClass; i++) {\n\t a[i] = val;\n\t val += interval;\n\t }\n\n\t //-> Fix last bound to Max of values\n\t a[nbClass] = tmpMax;\n\n\t this.setBounds(a);\n\t this.setRanges();\n\n\t // we specify the classification method\n\t this.method = _t('eq. intervals') + ' (' + nbClass + ' ' + _t('classes') + ')';\n\n\t return this.bounds;\n\t};\n\n\n\tthis.getQuantiles = function(nbClass) {\n\n\t\tvar nbClass = this._nbClassInt(nbClass); // ensure nbClass is an integer\n\n\t\tvar tmp = this.sorted();\n\t\tvar quantiles = [];\n\n\t\tvar step = this.pop() / nbClass;\n\t\tfor (var i = 1; i < nbClass; i++) {\n\t\t\tvar qidx = Math.round(i*step+0.49);\n\t\t\tquantiles.push(tmp[qidx-1]); // zero-based\n\t\t}\n\n\t\treturn quantiles;\n\t};\n\n\t/**\n\t * Quantile classification Return an array with bounds : ie array(0, 0.75,\n\t * 1.5, 2.25, 3);\n\t */\n\tthis.getClassQuantile = function(nbClass) {\n\n\t\tvar nbClass = this._nbClassInt(nbClass); // ensure nbClass is an integer\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tthis._classificationCheck(nbClass); // be sure number of classes is valid\n\n\t\tvar tmp = this.sorted();\n\t\tvar bounds = this.getQuantiles(nbClass);\n\t\tbounds.unshift(tmp[0]);\n\n\t\tif (bounds[tmp.length - 1] !== tmp[tmp.length - 1])\n\t\t\tbounds.push(tmp[tmp.length - 1]);\n\n\t\tthis.setBounds(bounds);\n\t\tthis.setRanges();\n\n\t\t// we specify the classification method\n\t\tthis.method = _t('quantile') + ' (' + nbClass + ' ' + _t('classes') + ')';\n\n\t\treturn this.bounds;\n\n\t};\n\n\t/**\n\t * Standard Deviation classification\n\t * Return an array with bounds : ie array(0,\n\t * 0.75, 1.5, 2.25, 3);\n\t */\n\tthis.getClassStdDeviation = function(nbClass, matchBounds) {\n\n\t\tvar nbClass = this._nbClassInt(nbClass); // ensure nbClass is an integer\n\n\t\tif (this._nodata())\n\t return;\n\n\t var tmpMax = this.max();\n\t\tvar tmpMin = this.min();\n\t\tvar tmpStdDev = this.stddev();\n\t\tvar tmpMean = this.mean();\n\n\t var a = Array();\n\n\t // number of classes is odd\n\t if(nbClass % 2 == 1) {\n\n\t \t// Euclidean division to get the inferior bound\n\t \tvar infBound = Math.floor(nbClass / 2);\n\n\t \tvar supBound = infBound + 1;\n\n\t \t// we set the central bounds\n\t \ta[infBound] = tmpMean - (tmpStdDev / 2);\n\t \ta[supBound] = tmpMean + (tmpStdDev / 2);\n\n\t \t// Values < to infBound, except first one\n\t \tfor (var i = infBound - 1; i > 0; i--) {\n\t \t\tvar val = a[i+1] - tmpStdDev;\n\t\t a[i] = val;\n\t\t }\n\n\t \t// Values > to supBound, except last one\n\t \tfor (var i = supBound + 1; i < nbClass; i++) {\n\t \t\tvar val = a[i-1] + tmpStdDev;\n\t\t a[i] = val;\n\t\t }\n\n\t \t// number of classes is even\n\t } else {\n\n\t \tvar meanBound = nbClass / 2;\n\n\t \t// we get the mean value\n\t \ta[meanBound] = tmpMean;\n\n\t \t// Values < to the mean, except first one\n\t \tfor (var i = meanBound - 1; i > 0; i--) {\n\t \t\tvar val = a[i+1] - tmpStdDev;\n\t\t a[i] = val;\n\t\t }\n\n\t \t// Values > to the mean, except last one\n\t \tfor (var i = meanBound + 1; i < nbClass; i++) {\n\t \t\tvar val = a[i-1] + tmpStdDev;\n\t\t a[i] = val;\n\t\t }\n\t }\n\n\n\t // we finally set the first value\n\t // do we excatly match min value or not ?\n\t a[0] = (typeof matchBounds === \"undefined\") ? a[1]- tmpStdDev : tmpMin;\n\n \t// we finally set the last value\n\t // do we excatly match max value or not ?\n \ta[nbClass] = (typeof matchBounds === \"undefined\") ? a[nbClass-1] + tmpStdDev : tmpMax;\n\n\t this.setBounds(a);\n\t this.setRanges();\n\n\t // we specify the classification method\n\t this.method = _t('std deviation') + ' (' + nbClass + ' ' + _t('classes')+ ')';\n\n\t return this.bounds;\n\t};\n\n\n\t/**\n\t * Geometric Progression classification\n\t * http://en.wikipedia.org/wiki/Geometric_progression\n\t * Return an array with bounds : ie array(0,\n\t * 0.75, 1.5, 2.25, 3);\n\t */\n\tthis.getClassGeometricProgression = function(nbClass) {\n\n\t\tvar nbClass = this._nbClassInt(nbClass); // ensure nbClass is an integer\n\n\t\tif (this._nodata())\n\t return;\n\n\t if(this._hasNegativeValue() || this._hasZeroValue()) {\n\t \tif(this.silent) this.log(\"[silent mode] \" + _t('geometric progression can\\'t be applied with a serie containing negative or zero values.'), true);\n\t\t\telse throw new TypeError(_t('geometric progression can\\'t be applied with a serie containing negative or zero values.'));\n\t \treturn;\n\t }\n\n\t var a = Array();\n\t var tmpMin = this.min();\n\t var tmpMax = this.max();\n\n\t var logMax = Math.log(tmpMax) / Math.LN10; // max decimal logarithm (or base 10)\n\t var logMin = Math.log(tmpMin) / Math.LN10;; // min decimal logarithm (or base 10)\n\n\t var interval = (logMax - logMin) / nbClass;\n\n\t // we compute log bounds\n\t for (var i = 0; i < nbClass; i++) {\n\t \tif(i == 0) {\n\t \t\ta[i] = logMin;\n\t \t} else {\n\t \t\ta[i] = a[i-1] + interval;\n\t \t}\n\t }\n\n\t // we compute antilog\n\t a = a.map(function(x) { return Math.pow(10, x); });\n\n\t // and we finally add max value\n\t a.push(this.max());\n\n\t this.setBounds(a);\n\t this.setRanges();\n\n\t // we specify the classification method\n\t this.method = _t('geometric progression') + ' (' + nbClass + ' ' + _t('classes') + ')';\n\n\t return this.bounds;\n\t};\n\n\t/**\n\t * Arithmetic Progression classification\n\t * http://en.wikipedia.org/wiki/Arithmetic_progression\n\t * Return an array with bounds : ie array(0,\n\t * 0.75, 1.5, 2.25, 3);\n\t */\n\tthis.getClassArithmeticProgression = function(nbClass) {\n\n\t\tvar nbClass = this._nbClassInt(nbClass); // ensure nbClass is an integer\n\n\t\tif (this._nodata())\n\t return;\n\n\t var denominator = 0;\n\n\t // we compute the (french) \"Raison\"\n\t for (var i = 1; i <= nbClass; i++) {\n\t denominator += i;\n\t }\n\n\t var a = Array();\n\t var tmpMin = this.min();\n\t var tmpMax = this.max();\n\n\t var interval = (tmpMax - tmpMin) / denominator;\n\n\t for (var i = 0; i <= nbClass; i++) {\n\t \tif(i == 0) {\n\t \t\ta[i] = tmpMin;\n\t\t\t} else if(i == nbClass) {\n\t\t\t\ta[i] = tmpMax;\n\t\t\t} else {\n\t \t\ta[i] = a[i-1] + (i * interval);\n\t \t}\n\t }\n\n\t this.setBounds(a);\n\t this.setRanges();\n\n\t // we specify the classification method\n\t this.method = _t('arithmetic progression') + ' (' + nbClass + ' ' + _t('classes') + ')';\n\n\t return this.bounds;\n\t};\n\n\t/**\n\t * Credits : Doug Curl (javascript) and Daniel J Lewis (python implementation)\n\t * http://www.arcgis.com/home/item.html?id=0b633ff2f40d412995b8be377211c47b\n\t * http://danieljlewis.org/2010/06/07/jenks-natural-breaks-algorithm-in-python/\n\t */\n\tthis.getClassJenks2 = function(nbClass) {\n\n\t\tvar nbClass = this._nbClassInt(nbClass); // ensure nbClass is an integer\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tthis._classificationCheck(nbClass); // be sure number of classes is valid\n\n\t\tvar dataList = this.sorted();\n\n\t\t// now iterate through the datalist:\n\t\t// determine mat1 and mat2\n\t\t// really not sure how these 2 different arrays are set - the code for\n\t\t// each seems the same!\n\t\t// but the effect are 2 different arrays: mat1 and mat2\n\t\tvar mat1 = []\n\t\tfor ( var x = 0, xl = dataList.length + 1; x < xl; x++) {\n\t\t\tvar temp = []\n\t\t\tfor ( var j = 0, jl = nbClass + 1; j < jl; j++) {\n\t\t\t\ttemp.push(0)\n\t\t\t}\n\t\t\tmat1.push(temp)\n\t\t}\n\n\t\tvar mat2 = []\n\t\tfor ( var i = 0, il = dataList.length + 1; i < il; i++) {\n\t\t\tvar temp2 = []\n\t\t\tfor ( var c = 0, cl = nbClass + 1; c < cl; c++) {\n\t\t\t\ttemp2.push(0)\n\t\t\t}\n\t\t\tmat2.push(temp2)\n\t\t}\n\n\t\t// absolutely no idea what this does - best I can tell, it sets the 1st\n\t\t// group in the\n\t\t// mat1 and mat2 arrays to 1 and 0 respectively\n\t\tfor ( var y = 1, yl = nbClass + 1; y < yl; y++) {\n\t\t\tmat1[0][y] = 1\n\t\t\tmat2[0][y] = 0\n\t\t\tfor ( var t = 1, tl = dataList.length + 1; t < tl; t++) {\n\t\t\t\tmat2[t][y] = Infinity\n\t\t\t}\n\t\t\tvar v = 0.0\n\t\t}\n\n\t\t// and this part - I'm a little clueless on - but it works\n\t\t// pretty sure it iterates across the entire dataset and compares each\n\t\t// value to\n\t\t// one another to and adjust the indices until you meet the rules:\n\t\t// minimum deviation\n\t\t// within a class and maximum separation between classes\n\t\tfor ( var l = 2, ll = dataList.length + 1; l < ll; l++) {\n\t\t\tvar s1 = 0.0\n\t\t\tvar s2 = 0.0\n\t\t\tvar w = 0.0\n\t\t\tfor ( var m = 1, ml = l + 1; m < ml; m++) {\n\t\t\t\tvar i3 = l - m + 1\n\t\t\t\tvar val = parseFloat(dataList[i3 - 1])\n\t\t\t\ts2 += val * val\n\t\t\t\ts1 += val\n\t\t\t\tw += 1\n\t\t\t\tv = s2 - (s1 * s1) / w\n\t\t\t\tvar i4 = i3 - 1\n\t\t\t\tif (i4 != 0) {\n\t\t\t\t\tfor ( var p = 2, pl = nbClass + 1; p < pl; p++) {\n\t\t\t\t\t\tif (mat2[l][p] >= (v + mat2[i4][p - 1])) {\n\t\t\t\t\t\t\tmat1[l][p] = i3\n\t\t\t\t\t\t\tmat2[l][p] = v + mat2[i4][p - 1]\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tmat1[l][1] = 1\n\t\t\tmat2[l][1] = v\n\t\t}\n\n\t\tvar k = dataList.length\n\t\tvar kclass = []\n\n\t\t// fill the kclass (classification) array with zeros:\n\t\tfor (var i = 0; i <= nbClass; i++) {\n\t\t\tkclass.push(0);\n\t\t}\n\n\t\t// this is the last number in the array:\n\t\tkclass[nbClass] = parseFloat(dataList[dataList.length - 1])\n\t\t// this is the first number - can set to zero, but want to set to lowest\n\t\t// to use for legend:\n\t\tkclass[0] = parseFloat(dataList[0])\n\t\tvar countNum = nbClass\n\t\twhile (countNum >= 2) {\n\t\t\tvar id = parseInt((mat1[k][countNum]) - 2)\n\t\t\tkclass[countNum - 1] = dataList[id]\n\t\t\tk = parseInt((mat1[k][countNum] - 1))\n\t\t\t// spits out the rank and value of the break values:\n\t\t\t// console.log(\"id=\"+id,\"rank = \" + String(mat1[k][countNum]),\"val =\n\t\t\t// \" + String(dataList[id]))\n\t\t\t// count down:\n\t\t\tcountNum -= 1\n\t\t}\n\t\t// check to see if the 0 and 1 in the array are the same - if so, set 0\n\t\t// to 0:\n\t\tif (kclass[0] == kclass[1]) {\n\t\t\tkclass[0] = 0\n\t\t}\n\n\t\tthis.setBounds(kclass);\n\t\tthis.setRanges();\n\n\n\t\tthis.method = _t('Jenks2') + ' (' + nbClass + ' ' + _t('classes') + ')';\n\n\t\treturn this.bounds; //array of breaks\n\t}\n\n\t/**\n\t * Credits from simple-statistics library\n\t * https://github.com/simple-statistics/simple-statistics\n\t * https://gist.githubusercontent.com/tmcw/4969184/raw/cfd9572d00db6bcdc34f07b088738fc3a47846b4/simple_statistics.js\n\t */\n\tthis.getClassJenks = function(nbClass) {\n\n\t\tvar nbClass = this._nbClassInt(nbClass); // ensure nbClass is an integer\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tthis._classificationCheck(nbClass); // be sure number of classes is valid\n\n\t\tvar dataList = this.sorted();\n\n\t\t// Compute the matrices required for Jenks breaks. These matrices\n\t\t// can be used for any classing of data with `classes <= n_classes`\n\t\tvar jenksMatrices = function(data, n_classes) {\n\n\t\t\t// in the original implementation, these matrices are referred to\n\t\t\t// as `LC` and `OP`\n\t\t\t//\n\t\t\t// * lower_class_limits (LC): optimal lower class limits\n\t\t\t// * variance_combinations (OP): optimal variance combinations for all classes\n\t\t\tvar lower_class_limits = [],\n\t\t\t\tvariance_combinations = [],\n\t\t\t\t// loop counters\n\t\t\t\ti, j,\n\t\t\t\t// the variance, as computed at each step in the calculation\n\t\t\t\tvariance = 0;\n\n\t\t\t// Initialize and fill each matrix with zeroes\n\t\t\tfor (var i = 0; i < data.length + 1; i++) {\n\t\t\t\tvar tmp1 = [], tmp2 = [];\n\t\t\t\tfor (var j = 0; j < n_classes + 1; j++) {\n\t\t\t\t\ttmp1.push(0);\n\t\t\t\t\ttmp2.push(0);\n\t\t\t\t}\n\t\t\t\tlower_class_limits.push(tmp1);\n\t\t\t\tvariance_combinations.push(tmp2);\n\t\t\t}\n\n\t\t\tfor (var i = 1; i < n_classes + 1; i++) {\n\t\t\t\tlower_class_limits[1][i] = 1;\n\t\t\t\tvariance_combinations[1][i] = 0;\n\t\t\t\t// in the original implementation, 9999999 is used but\n\t\t\t\t// since Javascript has `Infinity`, we use that.\n\t\t\t\tfor (var j = 2; j < data.length + 1; j++) {\n\t\t\t\t\tvariance_combinations[j][i] = Infinity;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (var l = 2; l < data.length + 1; l++) {\n\n\t\t\t\t// `SZ` originally. this is the sum of the values seen thus\n\t\t\t\t// far when calculating variance.\n\t\t\t\tvar sum = 0,\n\t\t\t\t\t// `ZSQ` originally. the sum of squares of values seen\n\t\t\t\t\t// thus far\n\t\t\t\t\tsum_squares = 0,\n\t\t\t\t\t// `WT` originally. This is the number of\n\t\t\t\t\tw = 0,\n\t\t\t\t\t// `IV` originally\n\t\t\t\t\ti4 = 0;\n\n\t\t\t\t// in several instances, you could say `Math.pow(x, 2)`\n\t\t\t\t// instead of `x * x`, but this is slower in some browsers\n\t\t\t\t// introduces an unnecessary concept.\n\t\t\t\tfor (var m = 1; m < l + 1; m++) {\n\n\t\t\t\t\t// `III` originally\n\t\t\t\t\tvar lower_class_limit = l - m + 1,\n\t\t\t\t\t\tval = data[lower_class_limit - 1];\n\n\t\t\t\t\t// here we're estimating variance for each potential classing\n\t\t\t\t\t// of the data, for each potential number of classes. `w`\n\t\t\t\t\t// is the number of data points considered so far.\n\t\t\t\t\tw++;\n\n\t\t\t\t\t// increase the current sum and sum-of-squares\n\t\t\t\t\tsum += val;\n\t\t\t\t\tsum_squares += val * val;\n\n\t\t\t\t\t// the variance at this point in the sequence is the difference\n\t\t\t\t\t// between the sum of squares and the total x 2, over the number\n\t\t\t\t\t// of samples.\n\t\t\t\t\tvariance = sum_squares - (sum * sum) / w;\n\n\t\t\t\t\ti4 = lower_class_limit - 1;\n\n\t\t\t\t\tif (i4 !== 0) {\n\t\t\t\t\t\tfor (var j = 2; j < n_classes + 1; j++) {\n\t\t\t\t\t\t\tif (variance_combinations[l][j] >=\n\t\t\t\t\t\t\t\t(variance + variance_combinations[i4][j - 1])) {\n\t\t\t\t\t\t\t\tlower_class_limits[l][j] = lower_class_limit;\n\t\t\t\t\t\t\t\tvariance_combinations[l][j] = variance +\n\t\t\t\t\t\t\t\t\tvariance_combinations[i4][j - 1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlower_class_limits[l][1] = 1;\n\t\t\t\tvariance_combinations[l][1] = variance;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tlower_class_limits: lower_class_limits,\n\t\t\t\tvariance_combinations: variance_combinations\n\t\t\t};\n\t\t};\n\n // get our basic matrices\n var matrices = jenksMatrices(dataList, nbClass),\n // we only need lower class limits here\n lower_class_limits = matrices.lower_class_limits,\n k = dataList.length - 1,\n kclass = [],\n countNum = nbClass;\n\n // the calculation of classes will never include the upper and\n // lower bounds, so we need to explicitly set them\n kclass[nbClass] = dataList[dataList.length - 1];\n kclass[0] = dataList[0];\n\n // the lower_class_limits matrix is used as indexes into itself\n // here: the `k` variable is reused in each iteration.\n while (countNum > 1) {\n kclass[countNum - 1] = dataList[lower_class_limits[k][countNum] - 2];\n k = lower_class_limits[k][countNum] - 1;\n countNum--;\n }\n\n\t\tthis.setBounds(kclass);\n\t\tthis.setRanges();\n\n\n\t\tthis.method = _t('Jenks') + ' (' + nbClass + ' ' + _t('classes') + ')';\n\n\t\treturn this.bounds; //array of breaks\n\t}\n\n\n\t/**\n\t * Unique classification Return as many entries as unique values : ie array('blue', 'red', yellow')\n\t * 1.5, 2.25, 3);\n\t */\n\tthis.getClassUniqueValues = function() {\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tthis.is_uniqueValues = true;\n\n\t\tvar tmp = this.sorted(); // display in alphabetical order\n\n\t\tvar a = Array();\n\n\t\tfor (var i = 0; i < this.pop(); i++) {\n\t\t\tif(a.indexOf(tmp[i]) === -1)\n\t\t\t\ta.push(tmp[i]);\n\t\t}\n\n\t\tthis.bounds = a;\n\n\t\t// we specify the classification method\n\t\tthis.method = _t('unique values');\n\n\t\treturn a;\n\n\t};\n\n\n\t/**\n\t * Return the class of a given value.\n\t * For example value : 6\n\t * and bounds array = (0, 4, 8, 12);\n\t * Return 2\n\t */\n\tthis.getClass = function(value) {\n\n\t\tfor (var i = 0; i < this.bounds.length; i++) {\n\n\t\t\tif(this.is_uniqueValues == true) {\n\n\t\t\t\tif(value == this.bounds[i]) {\n\t\t\t\t\t// console.log(value + ' - ' + this.bounds[i] + ' returned value : ' + i);\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// parseFloat() is necessary\n\t\t\t\tif(parseFloat(value) <= this.bounds[i + 1]) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn _t(\"Unable to get value's class.\");\n\n\t};\n\n\t/**\n\t * Return the ranges array : array('0-0.75', '0.75-1.5', '1.5-2.25',\n\t * '2.25-3');\n\t */\n\tthis.getRanges = function() {\n\n\t\treturn this.ranges;\n\n\t};\n\n\t/**\n\t * Returns the number/index of this.ranges that value falls into\n\t */\n\tthis.getRangeNum = function(value) {\n\n\t\tvar bounds, i;\n\n\t\tfor (var i = 0; i < this.ranges.length; i++) {\n\t\t\tbounds = this.ranges[i].split(/ - /);\n\t\t\tif (value <= parseFloat(bounds[1])) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * Compute inner ranges based on serie.\n\t * Produce discontinous ranges used for legend - return an array similar to :\n\t * array('0.00-0.74', '0.98-1.52', '1.78-2.25', '2.99-3.14');\n\t * If inner ranges already computed, return array values.\n\t */\n\tthis.getInnerRanges = function() {\n\n\t\t// if already computed, we return the result\n\t\tif(this.inner_ranges != null)\n\t\t\treturn this.inner_ranges;\n\n\n\t\tvar a = new Array();\n\t\tvar tmp = this.sorted();\n\n\t\tvar cnt = 1; // bounds array counter\n\n\t\tfor (var i = 0; i < tmp.length; i++) {\n\n\t\t\tif(i == 0) var range_firstvalue = tmp[i]; // we init first range value\n\n\t\t\tif(parseFloat(tmp[i]) > parseFloat(this.bounds[cnt])) {\n\n\t\t\t\ta[cnt - 1] = '' + range_firstvalue + this.separator + tmp[i-1];\n\n\t\t\t\tvar range_firstvalue = tmp[i];\n\n\t\t\t\tcnt++;\n\n\t\t\t}\n\n\t\t\t// we reach the last range, we finally complete manually\n\t\t\t// and return the array\n\t\t\tif(cnt == (this.bounds.length - 1)) {\n\t\t\t\t// we set the last value\n\t\t\t\ta[cnt - 1] = '' + range_firstvalue + this.separator + tmp[tmp.length-1];\n\n\t\t\t\tthis.inner_ranges = a;\n\t\t\t\treturn this.inner_ranges;\n\t\t\t}\n\n\n\t\t}\n\n\t};\n\n\tthis.getSortedlist = function() {\n\n\t\treturn this.sorted().join(', ');\n\n\t};\n\n\t/**\n\t * Return an html legend\n\t * colors : specify an array of color (hexadecimal values)\n\t * legend : specify a text input for the legend. By default, just displays 'legend'\n\t * counter : if not null, display counter value\n\t * callback : if not null, callback function applied on legend boundaries\n\t * mode : \tnull, 'default', 'distinct', 'discontinuous' :\n\t * \t\t\t- if mode is null, will display legend as 'default mode'\n\t * \t\t\t- 'default' : displays ranges like in ranges array (continuous values), sample : 29.26 - 378.80 / 378.80 - 2762.25 / 2762.25 - 6884.84\n\t * \t\t\t- 'distinct' : Add + 1 according to decimal precision to distinguish classes (discrete values), sample : 29.26 - 378.80 / 378.81 - 2762.25 / 2762.26 - 6884.84\n\t * \t\t\t- 'discontinuous' : indicates the range of data actually falling in each class , sample : 29.26 - 225.43 / 852.12 - 2762.20 / 3001.25 - 6884.84 / not implemented yet\n\t * order : \tnull, 'ASC', 'DESC'\n\t */\n\tthis.getHtmlLegend = function(colors, legend, counter, callback, mode, order) {\n\n\t\tvar cnt= '';\n\t\tvar elements = new Array();\n\n\t\tthis.doCount(); // we do count, even if not displayed\n\n\t\tif(colors != null) {\n\t\t\tccolors = colors;\n\t\t}\n\t\telse {\n\t\t\tccolors = this.colors;\n\t\t}\n\n\t\tif(legend != null) {\n\t\t\tlg = legend;\n\t\t}\n\t\telse {\n\t\t\tlg = 'Legend';\n\t\t}\n\n\t\tif(counter != null) {\n\t\t\tgetcounter = true;\n\t\t}\n\t\telse {\n\t\t\tgetcounter = false;\n\t\t}\n\n\t\tif(callback != null) {\n\t\t\tfn = callback;\n\t\t}\n\t\telse {\n\t\t\tfn = function(o) {return o;};\n\t\t}\n\t\tif(mode == null) {\n\t\t\tmode = 'default';\n\t\t}\n\t\tif(mode == 'discontinuous') {\n\t\t\tthis.getInnerRanges();\n\t\t\t// check if some classes are not populated / equivalent of in_array function\n\t\t\tif(this.counter.indexOf(0) !== -1) {\n\t\t \tif(this.silent) this.log(\"[silent mode] \" + _t(\"Geostats cannot apply 'discontinuous' mode to the getHtmlLegend() method because some classes are not populated.\\nPlease switch to 'default' or 'distinct' modes. Exit!\"), true);\n\t\t\t\telse throw new TypeError(_t(\"Geostats cannot apply 'discontinuous' mode to the getHtmlLegend() method because some classes are not populated.\\nPlease switch to 'default' or 'distinct' modes. Exit!\"));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t}\n\t\tif(order !== 'DESC') order = 'ASC';\n\n\t\tif(ccolors.length < this.ranges.length) {\n\t\t\tif(this.silent) this.log(\"[silent mode] \" + _t('The number of colors should fit the number of ranges. Exit!'), true);\n\t\t\telse throw new TypeError(_t('The number of colors should fit the number of ranges. Exit!'));\n\t\t\treturn;\n\t\t}\n\n\t\tif(this.is_uniqueValues == false) {\n\n\t\t\tfor (var i = 0; i < (this.ranges.length); i++) {\n\t\t\t\tif(getcounter===true) {\n\t\t\t\t\tcnt = ' <span class=\"geostats-legend-counter\">(' + this.counter[i] + ')</span>';\n\t\t\t\t}\n\t\t\t\t//console.log(\"Ranges : \" + this.ranges[i]);\n\n\t\t\t\t// default mode\n\t\t\t\tvar tmp = this.ranges[i].split(this.separator);\n\n\t\t\t\tvar start_value = parseFloat(tmp[0]).toFixed(this.precision);\n\t\t\t\tvar end_value = parseFloat(tmp[1]).toFixed(this.precision);\n\n\n\t\t\t\t// if mode == 'distinct' and we are not working on the first value\n\t\t\t\tif(mode == 'distinct' && i != 0) {\n\n\t\t\t\t\tif(isInt(start_value)) {\n\t\t\t\t\t\tstart_value = parseInt(start_value) + 1;\n\t\t\t\t\t\t// format to float if necessary\n\t\t\t\t\t\tif(this.precisionflag == 'manual' && this.precision != 0) start_value = parseFloat(start_value).toFixed(this.precision);\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tstart_value = parseFloat(start_value) + (1 / Math.pow(10,this.precision));\n\t\t\t\t\t\t// strangely the formula above return sometimes long decimal values,\n\t\t\t\t\t\t// the following instruction fix it\n\t\t\t\t\t\tstart_value = parseFloat(start_value).toFixed(this.precision);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if mode == 'discontinuous'\n\t\t\t\tif(mode == 'discontinuous') {\n\n\t\t\t\t\tvar tmp = this.inner_ranges[i].split(this.separator);\n\t\t\t\t\t// console.log(\"Ranges : \" + this.inner_ranges[i]);\n\n\t\t\t\t\tvar start_value = parseFloat(tmp[0]).toFixed(this.precision);\n\t\t\t\t\tvar end_value = parseFloat(tmp[1]).toFixed(this.precision);\n\n\t\t\t\t}\n\n\t\t\t\t// we apply callback function\n\t\t\t\tvar el = fn(start_value) + this.legendSeparator + fn(end_value);\n\n\t\t\t\tvar block = '<div><div class=\"geostats-legend-block\" style=\"background-color:' + ccolors[i] + '\"></div> ' + el + cnt + '</div>';\n\t\t\t\telements.push(block);\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// only if classification is done on unique values\n\t\t\tfor (var i = 0; i < (this.bounds.length); i++) {\n\t\t\t\tif(getcounter===true) {\n\t\t\t\t\tcnt = ' <span class=\"geostats-legend-counter\">(' + this.counter[i] + ')</span>';\n\t\t\t\t}\n\t\t\t\tvar el = fn(this.bounds[i]);\n\t\t\t\tvar block = '<div><div class=\"geostats-legend-block\" style=\"background-color:' + ccolors[i] + '\"></div> ' + el + cnt + '</div>';\n\n\t\t\t\telements.push(block);\n\t\t\t}\n\n\t\t}\n\n\t\t// do we reverse the return legend ?\n\t\tif(order === 'DESC') elements.reverse();\n\n\t\t// finally we create HTML and return it\n\t\tvar content = '<div class=\"geostats-legend\"><div class=\"geostats-legend-title\">' + _t(lg) + '</div>';\n\t\tfor (var i = 0; i < (elements.length); i++) {\n\t\t\tcontent += elements[i];\n\t\t}\n\t\tcontent += '</div>';\n\n\t\treturn content;\n\t};\n\n\n\n\t// object constructor\n\t// At the end of script. If not setPrecision() method is not known\n\n\t// we create an object identifier for debugging\n\tthis.objectID = new Date().getUTCMilliseconds();\n\tthis.log('Creating new geostats object');\n\n\tif(typeof a !== 'undefined' && a.length > 0) {\n\t\tthis.serie = a;\n\t\tthis.setPrecision();\n\t\tthis.log('Setting serie (' + a.length + ') : ' + a.join());\n\t} else {\n\t\tthis.serie = Array();\n\n\t};\n\n\t// creating aliases on classification function for backward compatibility\n\tthis.getJenks = this.getClassJenks;\n\tthis.getJenks2 = this.getClassJenks2;\n\tthis.getGeometricProgression = this.getClassGeometricProgression;\n\tthis.getEqInterval = this.getClassEqInterval;\n\tthis.getQuantile = this.getClassQuantile;\n\tthis.getStdDeviation = this.getClassStdDeviation;\n\tthis.getUniqueValues = this.getClassUniqueValues;\n\tthis.getArithmeticProgression = this.getClassArithmeticProgression;\n\n};\n\n\nreturn geostats;\n});\n","import geostats from './geostats'\n\nL.SolrHeatmap = L.GeoJSON.extend({\n options: {\n solrRequestHandler: 'select',\n type: 'geojsonGrid',\n colors: ['#f1eef6', '#d7b5d8', '#df65b0', '#dd1c77', '#980043'],\n maxSampleSize: Number.MAX_SAFE_INTEGER, // for Jenks classification\n logging: false,\n },\n\n initialize: function (url, options) {\n var _this = this;\n options = L.setOptions(_this, options);\n _this._solrUrl = url;\n _this._layers = {};\n _this._getData();\n },\n\n onAdd: function (map) {\n var _this = this;\n\n // Call the parent function\n L.GeoJSON.prototype.onAdd.call(_this, map);\n\n map.on('moveend', function () {\n _this._getData();\n });\n },\n\n _computeHeatmapObject: function (data) {\n var _this = this;\n _this.facetHeatmap = data.response.facet_heatmaps[this.options.field];\n this._computeIntArrays();\n },\n\n _clearLayers: function () {\n var _this = this;\n\n switch (_this.options.type) {\n case 'geojsonGrid':\n _this.clearLayers();\n break;\n case 'clusters':\n _this.clusterMarkers.clearLayers();\n break;\n case 'heatmap':\n _this._map.removeLayer(_this.heatmapLayer);\n break;\n }\n },\n\n _createGeojson: function () {\n var _this = this;\n var geojson = {};\n\n geojson.type = 'FeatureCollection';\n geojson.features = [];\n\n _this.facetHeatmap.counts_ints2D.forEach(function(value, row) {\n if (value === null) {\n return;\n }\n\n value.forEach(function (val, column) {\n if (val === 0) {\n return;\n }\n\n var newFeature = {\n type: 'Feature',\n geometry: {\n type: 'Polygon',\n coordinates: [\n [\n [_this._minLng(column), _this._minLat(row)],\n [_this._minLng(column), _this._maxLat(row)],\n [_this._maxLng(column), _this._maxLat(row)],\n [_this._maxLng(column), _this._minLat(row)],\n [_this._minLng(column), _this._minLat(row)]\n ]\n ]\n },\n properties: {\n count: val\n }\n };\n geojson.features.push(newFeature);\n });\n });\n\n _this.addData(geojson);\n var colors = _this.options.colors;\n if (_this.facetHeatmap.counts_ints2D && _this.facetHeatmap.counts_ints2D.length > 0) {\n var classifications = _this._getClassifications(colors.length);\n _this._styleByCount(classifications);\n _this._showRenderTime();\n }\n },\n\n _createHeatmap: function () {\n var _this = this;\n var heatmapCells = [];\n var cellSize = _this._getCellSize() * .75;\n var colors = _this.options.colors;\n var classifications = _this._getClassifications(colors.length - 1);\n var maxValue = classifications[classifications.length - 1];\n var gradient = _this._getGradient(classifications);\n\n _this.facetHeatmap.counts_ints2D.forEach(function(value, row) {\n if (value === null) {\n return;\n }\n\n value.forEach(function (val, column) {\n if (val === 0) {\n return;\n }\n\n var scaledValue = Math.min((val / maxValue), 1);\n var current = [_this._minLat(row), _this._minLng(column), scaledValue];\n heatmapCells.push(current);\n\n // need to create options object to set gradient, blu, radius, max\n });\n });\n\n // settting max due to bug\n // http://stackoverflow.com/questions/26767722/leaflet-heat-issue-with-adding-points-with-intensity\n var options = { max: .0001, radius: cellSize, gradient: gradient };\n var heatmapLayer = L.heatLayer(heatmapCells, options);\n heatmapLayer.addTo(_this._map);\n _this.heatmapLayer = heatmapLayer;\n _this._showRenderTime();\n },\n\n // heatmap display need hash of scaled counts value, color pairs\n _getGradient: function (classifications) {\n var gradient = {};\n var maxValue = classifications[classifications.length - 1];\n var colors = _this.options.colors;\n // skip first lower bound, assumed to be 0 from Jenks\n for (var i = 1; i < classifications.length; i++)\n gradient[classifications[i] / maxValue] = colors[i];\n return gradient;\n },\n\n // compute size of heatmap cells in pixels\n _getCellSize: function () {\n _this = this;\n var mapSize = _this._map.getSize(); // should't we use solr returned map extent?\n var widthInPixels = mapSize.x;\n var heightInPixels = mapSize.y;\n var heatmapRows = _this.facetHeatmap.rows;\n var heatmapColumns = _this.facetHeatmap.columns;\n var sizeX = widthInPixels / heatmapColumns;\n var sizeY = heightInPixels / heatmapRows;\n var size = Math.ceil(Math.max(sizeX, sizeY));\n return size;\n },\n\n _showRenderTime: function () {\n if (this.options.logging) {\n var _this = this;\n var renderTime = 'Render time: ' + (Date.now() - _this.renderStart) + ' ms';\n console.log(renderTime);\n }\n },\n\n _createClusters: function() {\n var _this = this;\n\n _this.clusterMarkers = new L.MarkerClusterGroup({\n maxClusterRadius: 140,\n });\n\n _this.facetHeatmap.counts_ints2D.forEach(function(value, row) {\n if (value === null) {\n return;\n }\n\n value.forEach(function (val, column) {\n if (val === 0) {\n return;\n }\n\n var bounds = new L.latLngBounds([\n [_this._minLat(row), _this._minLng(column)],\n [_this._maxLat(row), _this._maxLng(column)],\n ]);\n _this.clusterMarkers.addLayer(new L.Marker(bounds.getCenter(), {\n count: val,\n }).bindPopup(val.toString()));\n });\n });\n\n _this._map.addLayer(_this.clusterMarkers);\n _this._showRenderTime();\n },\n\n _computeIntArrays: function () {\n var _this = this;\n\n _this.lengthX = (_this.facetHeatmap.maxX - _this.facetHeatmap.minX) / _this.facetHeatmap.columns;\n _this.lengthY = (_this.facetHeatmap.maxY - _this.facetHeatmap.minY) / _this.facetHeatmap.rows;\n _this._clearLayers();\n switch (_this.options.type) {\n case 'geojsonGrid':\n _this._createGeojson();\n break;\n case 'clusters':\n _this._createClusters();\n break;\n case 'heatmap':\n _this._createHeatmap();\n break;\n }\n },\n\n _getClassifications: function (howMany) {\n var _this = this;\n var oneDArray = [];\n _this.facetHeatmap.counts_ints2D.forEach(function(value, row) {\n if (value != null) {\n oneDArray = oneDArray.concat(value);\n }\n });\n\n var sampledArray = _this._sampleCounts(oneDArray);\n\n var series = new geostats(sampledArray);\n var scale = _this.options.colors;\n var classifications = series.getClassJenks(howMany - 1);\n return classifications.reduce(function (previous, current) {\n if (previous.indexOf(current) == -1) {\n previous.push(current);\n }\n\n return previous;\n }, []);\n },\n\n _styleByCount: function (classifications) {\n var _this = this;\n var scale = _this.options.colors.slice(this.options.colors.length - classifications.length, this.options.colors.length);\n\n _this.eachLayer(function (layer) {\n var color;\n classifications.forEach(function (val, i) {\n if (layer.feature.properties.count >= val) {\n color = scale[i];\n }\n });\n\n layer.setStyle({\n fillColor: color,\n fillOpacity: 0.5,\n weight: 0,\n });\n });\n },\n\n // Jenks classification can be slow so we optionally sample the data\n // typically any big sample of counts are much the same, don't need to classify on all of them\n _sampleCounts: function (passedArray) {\n const _this = this;\n if (passedArray.length <= _this.options.maxSampleSize) {\n return passedArray; // array too small to sample\n }\n\n var maxValue = Math.max.apply(Math, passedArray);\n var sampledArray = [];\n var period = Math.ceil(passedArray.length / _this.options.maxSampleSize);\n for (let i = 0; i < passedArray.length; i = i + period) {\n sampledArray.push(passedArray[i]);\n }\n\n sampledArray.push(maxValue); // make sure largest value gets in, doesn't matter much if duplicated\n return sampledArray;\n },\n\n _minLng: function (column) {\n return this.facetHeatmap.minX + (this.lengthX * column);\n },\n\n _minLat: function (row) {\n return this.facetHeatmap.maxY - (this.lengthY * row) - this.lengthY;\n },\n\n _maxLng: function (column) {\n return this.facetHeatmap.minX + (this.lengthX * column) + this.lengthX;\n },\n\n _maxLat: function (row) {\n return this.facetHeatmap.maxY - (this.lengthY * row);\n },\n\n _getData: function () {\n var _this = this;\n var startTime = Date.now();\n\n var url = new URL(_this._solrUrl);\n url.searchParams.append('bbox', _this._mapViewToBbox());\n\n fetch(url, {\n headers: {\n 'Accept': 'application/json',\n }\n }).then(function (response) {\n return response.json();\n }).then(function (data) {\n var totalTime = 'Solr response time: ' + (Date.now() - startTime) + ' ms';\n if (_this.options.logging) {\n console.log(totalTime);\n }\n\n _this.docsCount = data.response.numFound;\n _this.renderStart = Date.now();\n _this._computeHeatmapObject(data);\n _this.fireEvent('dataAdded', data);\n });\n },\n\n _mapViewToBbox: function () {\n if (this._map === undefined) {\n return '-180,-90,180,90';\n }\n\n var bounds = this._map.getBounds();\n var wrappedSw = bounds.getSouthWest().wrap();\n var wrappedNe = bounds.getNorthEast().wrap();\n return [wrappedSw.lng, bounds.getSouth(), wrappedNe.lng, bounds.getNorth()].join(',');\n },\n\n _mapViewToEnvelope: function () {\n if (this._map === undefined) {\n return ':\"Intersects(ENVELOPE(-180, 180, 90, -90))\"';\n }\n\n var bounds = this._map.getBounds();\n var wrappedSw = bounds.getSouthWest().wrap();\n var wrappedNe = bounds.getNorthEast().wrap();\n return ':\"Intersects(ENVELOPE(' + wrappedSw.lng + ', ' + wrappedNe.lng + ', ' + bounds.getNorth() + ', ' + bounds.getSouth() + '))\"';\n },\n\n _mapViewToWkt: function () {\n if (this._map === undefined) {\n return '[\"-180 -90\" TO \"180 90\"]';\n }\n\n var bounds = this._map.getBounds();\n var wrappedSw = bounds.getSouthWest().wrap();\n var wrappedNe = bounds.getNorthEast().wrap();\n return '[\"' + wrappedSw.lng + ' ' + bounds.getSouth() + '\" TO \"' + wrappedNe.lng + ' ' + bounds.getNorth() + '\"]';\n },\n\n _solrQuery: function () {\n return '/' + this.options.solrRequestHandler + '?' + this.options.field;\n },\n});\n\nL.solrHeatmap = function (url, options) {\n return new L.SolrHeatmap(url, options);\n};\n\n// Check if L.MarkerCluster is included\nif (typeof L.MarkerCluster !== 'undefined') {\n L.MarkerCluster.prototype.initialize = function (group, zoom, a, b) {\n\n L.Marker.prototype.initialize.call(this, a ? (a._cLatLng || a.getLatLng()) : new L.LatLng(0, 0), { icon: this });\n\n this._group = group;\n this._zoom = zoom;\n\n this._markers = [];\n this._childClusters = [];\n this._childCount = 0;\n this._iconNeedsUpdate = true;\n\n this._bounds = new L.LatLngBounds();\n\n if (a) {\n this._addChild(a);\n }\n\n if (b) {\n this._addChild(b);\n this._childCount = b.options.count;\n }\n };\n}\n","const Basemaps = {\n darkMatter: L.tileLayer(\n 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png', {\n attribution: '© <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors, © <a href=\"http://cartodb.com/attributions\">CartoDB</a>',\n maxZoom: 18,\n worldCopyJump: true,\n detectRetina: true,\n }\n ),\n positron: L.tileLayer(\n 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png', {\n attribution: '© <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors, © <a href=\"http://cartodb.com/attributions\">CartoDB</a>',\n maxZoom: 18,\n worldCopyJump: true,\n detectRetina: true,\n }\n ),\n 'OpenStreetMap.HOT': L.tileLayer(\n 'https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', {\n attribution: '© <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a>, Tiles courtesy of <a href=\"http://hot.openstreetmap.org/\" target=\"_blank\">Humanitarian OpenStreetMap Team</a>',\n maxZoom: 19,\n }\n ),\n}\n\nexport default Basemaps\n","const Icons = {\n default: new L.Icon.Default()\n}\n\nexport default Icons\n","const IndexView = L.Class.extend({\n options: {},\n\n initialize: function (el, options) {\n var requestUrl = el.dataset.searchUrl + '&format=heatmaps';\n var geometryField = el.dataset.geometryField;\n var template = el.dataset.sidebarTemplate;\n var colorRamp = JSON.parse(el.dataset.colorRamp);\n\n // Blank out page link content first and disable pagination\n document.querySelectorAll('#sortAndPerPage .page-links').forEach(function (links) {\n links.innerHTML = '';\n });\n document.querySelectorAll('ul.pagination').forEach(function (links) {\n links.classList.add('d-none');\n });\n\n var map = L.map(el.id).setView([0, 0], 1);\n var basemap = BlacklightHeatmaps.selectBasemap(\n el.dataset.basemapProvider\n ).addTo(map);\n\n var solrLayer = L.solrHeatmap(requestUrl, {\n field: geometryField,\n maxSampleSize: 50,\n colors: colorRamp,\n }).addTo(map);\n\n var sidebar = L.control.sidebar('index-map-sidebar', {\n position: 'right',\n });\n\n map.addControl(sidebar);\n\n solrLayer.on('click', function (e) {\n if (!sidebar.isVisible()) {\n map.setView(e.latlng);\n } else {\n var point = map.project(e.latlng);\n var offset = sidebar.getOffset();\n var newPoint = L.point(point.x - (offset / 2), point.y);\n map.setView(map.unproject(newPoint));\n }\n\n sidebar.show();\n });\n\n solrLayer.on('dataAdded', function (e) {\n if (e.response && e.response.docs) {\n var html = '';\n e.response.docs.forEach(function (value) {\n html += L.Util.template(template, value);\n });\n\n sidebar.setContent(html);\n\n var docCount = e.response.pages.total_count;\n\n document.querySelectorAll('#sortAndPerPage .page-links').forEach(function (links) {\n links.innerHTML = parseInt(docCount).toLocaleString() + ' ' + (docCount == 1 ? 'item' : 'items') + ' found';\n });\n }\n });\n },\n\n pluralize: function (count, word) {\n switch (count) {\n case 1:\n return word;\n default:\n return word + 's';\n }\n },\n});\n\nexport default IndexView;\n","const ShowView = L.Class.extend({\n options: {},\n\n initialize: function (el, options) {\n var json = JSON.parse(el.dataset.features);\n\n var map = L.map(el.id).setView([0, 0], 1);\n var basemap = BlacklightHeatmaps.selectBasemap(\n el.dataset.basemapProvider\n ).addTo(map);\n\n var features = L.geoJson(json, {\n pointToLayer: function(feature, latlng) {\n return L.marker(latlng, {\n icon: BlacklightHeatmaps.Icons.default\n })\n }\n }).addTo(map);\n\n map.fitBounds(features.getBounds());\n },\n});\n\nexport default ShowView\n","import L from 'leaflet'\nimport '../../vendor/assets/javascripts/leaflet_solr_heatmap'\nimport Basemaps from './basemaps'\nimport Icons from './icons'\nimport IndexView from './viewers/index'\nimport ShowView from './viewers/show'\n\nconst BlacklightHeatmaps = L.Class.extend({\n statics: {\n __version__: '0.0.3',\n\n selectBasemap: function (basemap) {\n if (basemap && basemap !== undefined) {\n return BlacklightHeatmaps.Basemaps[basemap];\n } else {\n return BlacklightHeatmaps.Basemaps.positron;\n }\n },\n },\n})\n\nBlacklightHeatmaps.Basemaps = Basemaps\nBlacklightHeatmaps.Icons = Icons\nBlacklightHeatmaps.IndexView = IndexView\nBlacklightHeatmaps.indexView = function (el, options) {\n return new IndexView(el, options)\n}\nBlacklightHeatmaps.ShowView = ShowView;\nBlacklightHeatmaps.showView = function (el, options) {\n return new ShowView(el, options);\n};\n\nBlacklight.onLoad(function () {\n document.querySelectorAll('[data-index-map]').forEach(function (el) {\n BlacklightHeatmaps.indexView(el, {});\n })\n document.querySelectorAll('[data-show-map]').forEach(function (el) {\n BlacklightHeatmaps.showView(el);\n });\n})\n\nexport default BlacklightHeatmaps;\n"],"names":["BlacklightHeatmaps","L"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;GAQA,CAAC,UAAU,UAAU,EAAE;CACvB;CACA;;CAEA;CACA,MAAqC;WAC7B,MAAA,CAAA,OAAA,GAAiB,UAAU,EAAE;;CAErC;;;CASA,GAAC,EAAE,YAAY;;CAEf,EAAA,IAAI,KAAK,GAAG,SAAS,CAAC,EAAE;MACrB,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,UAAU,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;KAC/E;;CAED,EAAA,IAAI,EAAE,GAAG,SAAS,GAAG,EAAE;CACvB,GAAC,OAAO,GAAG;IACV;;CAED;CACA,EAAA,IAAI,QAAQ,GAAG,SAAS,CAAC,EAAE;CAC3B,KAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC;CAC9C;;;;CAIA;CACA;CACA,EAAA,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,EAAE;OAC1B,KAAK,CAAC,SAAS,CAAC,OAAO,GAAG,UAAU,aAAa,EAAE,SAAS,EAAE;SAC5D,KAAK,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,IAAI,GAAG;CACjD,UAAQ,MAAM,IAAI,SAAS,EAAE,+BAA+B,EAAE;CAC9D;;SAEM,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;;CAErC,QAAM,SAAS,GAAG,CAAC,SAAS,IAAI,CAAC;;SAE3B,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,QAAQ,EAAE;WACpC,SAAS,GAAG,CAAC;CACrB;;CAEA,QAAM,IAAI,SAAS,GA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AAkB,CAAC,QAAQ,CAAC,QAAQ;CACnD;CACA,KAAK;CACL,GAAG;CACH,CAAC;;AAEDA,qBAAkB,CAAC,QAAQ,GAAG;AAC9BA,qBAAkB,CAAC,KAAK,GAAG;AAC3BA,qBAAkB,CAAC,SAAS,GAAG;AAC/BA,qBAAkB,CAAC,SAAS,GAAG,UAAU,EAAE,EAAE,OAAO,EAAE;CACtD,IAAI,OAAO,IAAI,SAAS,CAAC,EAAE,EAAE,OAAO;CACpC;AACAA,qBAAkB,CAAC,QAAQ,GAAG,QAAQ;AACtCA,qBAAkB,CAAC,QAAQ,GAAG,UAAU,EAAE,EAAE,OAAO,EAAE;CACrD,EAAE,OAAO,IAAI,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;CAClC,CAAC;;CAED,UAAU,CAAC,MAAM,CAAC,YAAY;CAC9B,EAAE,QAAQ,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE;CACtE,IAAIA,oBAAkB,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;CACxC,GAAG;CACH,EAAE,QAAQ,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE;CACrE,IAAIA,oBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC;CACnC,GAAG,CAAC;CACJ,CAAC;;;;;;;;"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
const Basemaps = {
|
2
2
|
darkMatter: L.tileLayer(
|
3
3
|
'https://cartodb-basemaps-{s}.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png', {
|
4
4
|
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://cartodb.com/attributions">CartoDB</a>',
|
@@ -21,4 +21,6 @@ BlacklightHeatmaps.Basemaps = {
|
|
21
21
|
maxZoom: 19,
|
22
22
|
}
|
23
23
|
),
|
24
|
-
}
|
24
|
+
}
|
25
|
+
|
26
|
+
export default Basemaps
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import L from 'leaflet'
|
2
|
+
import '../../vendor/assets/javascripts/leaflet_solr_heatmap'
|
3
|
+
import Basemaps from './basemaps'
|
4
|
+
import Icons from './icons'
|
5
|
+
import IndexView from './viewers/index'
|
6
|
+
import ShowView from './viewers/show'
|
7
|
+
|
8
|
+
const BlacklightHeatmaps = L.Class.extend({
|
9
|
+
statics: {
|
10
|
+
__version__: '0.0.3',
|
11
|
+
|
12
|
+
selectBasemap: function (basemap) {
|
13
|
+
if (basemap && basemap !== undefined) {
|
14
|
+
return BlacklightHeatmaps.Basemaps[basemap];
|
15
|
+
} else {
|
16
|
+
return BlacklightHeatmaps.Basemaps.positron;
|
17
|
+
}
|
18
|
+
},
|
19
|
+
},
|
20
|
+
})
|
21
|
+
|
22
|
+
BlacklightHeatmaps.Basemaps = Basemaps
|
23
|
+
BlacklightHeatmaps.Icons = Icons
|
24
|
+
BlacklightHeatmaps.IndexView = IndexView
|
25
|
+
BlacklightHeatmaps.indexView = function (el, options) {
|
26
|
+
return new IndexView(el, options)
|
27
|
+
}
|
28
|
+
BlacklightHeatmaps.ShowView = ShowView;
|
29
|
+
BlacklightHeatmaps.showView = function (el, options) {
|
30
|
+
return new ShowView(el, options);
|
31
|
+
};
|
32
|
+
|
33
|
+
Blacklight.onLoad(function () {
|
34
|
+
document.querySelectorAll('[data-index-map]').forEach(function (el) {
|
35
|
+
BlacklightHeatmaps.indexView(el, {});
|
36
|
+
})
|
37
|
+
document.querySelectorAll('[data-show-map]').forEach(function (el) {
|
38
|
+
BlacklightHeatmaps.showView(el);
|
39
|
+
});
|
40
|
+
})
|
41
|
+
|
42
|
+
export default BlacklightHeatmaps;
|
@@ -0,0 +1,76 @@
|
|
1
|
+
const IndexView = L.Class.extend({
|
2
|
+
options: {},
|
3
|
+
|
4
|
+
initialize: function (el, options) {
|
5
|
+
var requestUrl = el.dataset.searchUrl + '&format=heatmaps';
|
6
|
+
var geometryField = el.dataset.geometryField;
|
7
|
+
var template = el.dataset.sidebarTemplate;
|
8
|
+
var colorRamp = JSON.parse(el.dataset.colorRamp);
|
9
|
+
|
10
|
+
// Blank out page link content first and disable pagination
|
11
|
+
document.querySelectorAll('#sortAndPerPage .page-links').forEach(function (links) {
|
12
|
+
links.innerHTML = '';
|
13
|
+
});
|
14
|
+
document.querySelectorAll('ul.pagination').forEach(function (links) {
|
15
|
+
links.classList.add('d-none');
|
16
|
+
});
|
17
|
+
|
18
|
+
var map = L.map(el.id).setView([0, 0], 1);
|
19
|
+
var basemap = BlacklightHeatmaps.selectBasemap(
|
20
|
+
el.dataset.basemapProvider
|
21
|
+
).addTo(map);
|
22
|
+
|
23
|
+
var solrLayer = L.solrHeatmap(requestUrl, {
|
24
|
+
field: geometryField,
|
25
|
+
maxSampleSize: 50,
|
26
|
+
colors: colorRamp,
|
27
|
+
}).addTo(map);
|
28
|
+
|
29
|
+
var sidebar = L.control.sidebar('index-map-sidebar', {
|
30
|
+
position: 'right',
|
31
|
+
});
|
32
|
+
|
33
|
+
map.addControl(sidebar);
|
34
|
+
|
35
|
+
solrLayer.on('click', function (e) {
|
36
|
+
if (!sidebar.isVisible()) {
|
37
|
+
map.setView(e.latlng);
|
38
|
+
} else {
|
39
|
+
var point = map.project(e.latlng);
|
40
|
+
var offset = sidebar.getOffset();
|
41
|
+
var newPoint = L.point(point.x - (offset / 2), point.y);
|
42
|
+
map.setView(map.unproject(newPoint));
|
43
|
+
}
|
44
|
+
|
45
|
+
sidebar.show();
|
46
|
+
});
|
47
|
+
|
48
|
+
solrLayer.on('dataAdded', function (e) {
|
49
|
+
if (e.response && e.response.docs) {
|
50
|
+
var html = '';
|
51
|
+
e.response.docs.forEach(function (value) {
|
52
|
+
html += L.Util.template(template, value);
|
53
|
+
});
|
54
|
+
|
55
|
+
sidebar.setContent(html);
|
56
|
+
|
57
|
+
var docCount = e.response.pages.total_count;
|
58
|
+
|
59
|
+
document.querySelectorAll('#sortAndPerPage .page-links').forEach(function (links) {
|
60
|
+
links.innerHTML = parseInt(docCount).toLocaleString() + ' ' + (docCount == 1 ? 'item' : 'items') + ' found';
|
61
|
+
});
|
62
|
+
}
|
63
|
+
});
|
64
|
+
},
|
65
|
+
|
66
|
+
pluralize: function (count, word) {
|
67
|
+
switch (count) {
|
68
|
+
case 1:
|
69
|
+
return word;
|
70
|
+
default:
|
71
|
+
return word + 's';
|
72
|
+
}
|
73
|
+
},
|
74
|
+
});
|
75
|
+
|
76
|
+
export default IndexView;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
const ShowView = L.Class.extend({
|
2
|
+
options: {},
|
3
|
+
|
4
|
+
initialize: function (el, options) {
|
5
|
+
var json = JSON.parse(el.dataset.features);
|
6
|
+
|
7
|
+
var map = L.map(el.id).setView([0, 0], 1);
|
8
|
+
var basemap = BlacklightHeatmaps.selectBasemap(
|
9
|
+
el.dataset.basemapProvider
|
10
|
+
).addTo(map);
|
11
|
+
|
12
|
+
var features = L.geoJson(json, {
|
13
|
+
pointToLayer: function(feature, latlng) {
|
14
|
+
return L.marker(latlng, {
|
15
|
+
icon: BlacklightHeatmaps.Icons.default
|
16
|
+
})
|
17
|
+
}
|
18
|
+
}).addTo(map);
|
19
|
+
|
20
|
+
map.fitBounds(features.getBounds());
|
21
|
+
},
|
22
|
+
});
|
23
|
+
|
24
|
+
export default ShowView
|
@@ -11,6 +11,8 @@ module BlacklightHeatmaps
|
|
11
11
|
def inject_js
|
12
12
|
inject_into_file 'app/assets/javascripts/application.js', after: '//= require blacklight/blacklight' do
|
13
13
|
"\n// Required by BlacklightHeatmaps" \
|
14
|
+
"\n//= require leaflet" \
|
15
|
+
"\n//= require L.Control.Sidebar" \
|
14
16
|
"\n//= require blacklight_heatmaps/default"
|
15
17
|
end
|
16
18
|
end
|
data/spec/examples.txt
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
example_id | status | run_time |
|
2
|
+
--------------------------------------------------------------------------------------- | ------ | --------------- |
|
3
|
+
./spec/features/configurable_basemap_spec.rb[1:1] | passed | 0.17827 seconds |
|
4
|
+
./spec/features/configurable_basemap_spec.rb[1:2:1] | passed | 0.13454 seconds |
|
5
|
+
./spec/features/configurable_basemap_spec.rb[1:3:1] | passed | 0.20226 seconds |
|
6
|
+
./spec/features/index_page_map_spec.rb[1:1] | passed | 6.44 seconds |
|
7
|
+
./spec/features/show_page_map_spec.rb[1:1] | passed | 3.96 seconds |
|
8
|
+
./spec/features/show_page_map_spec.rb[1:2] | passed | 0.3658 seconds |
|
9
|
+
./spec/helpers/blacklight/maps_helper_spec.rb[1:1:1] | passed | 0.00472 seconds |
|
10
|
+
./spec/helpers/blacklight/maps_helper_spec.rb[1:2:1] | passed | 0.00154 seconds |
|
11
|
+
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:1:1] | passed | 0.00006 seconds |
|
12
|
+
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:2:1] | passed | 0.00006 seconds |
|
13
|
+
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:3:1] | passed | 0.00011 seconds |
|
14
|
+
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:4:1] | passed | 0.00006 seconds |
|
15
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb[1:1:1:1] | passed | 0.00008 seconds |
|
16
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb[1:1:2:1] | passed | 0.00006 seconds |
|
17
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb[1:1:3:1] | passed | 0.00099 seconds |
|
18
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:1:1] | passed | 0.00017 seconds |
|
19
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:2:1] | passed | 0.00007 seconds |
|
20
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:3:1] | passed | 0.00883 seconds |
|
21
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:4:1] | passed | 0.00012 seconds |
|
22
|
+
./spec/models/concerns/blacklight_heatmaps/point_spec.rb[1:1:1] | passed | 0.01197 seconds |
|
23
|
+
./spec/models/concerns/blacklight_heatmaps/point_spec.rb[1:2:1] | passed | 0.00049 seconds |
|
24
|
+
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:1:1:1] | passed | 0.00126 seconds |
|
25
|
+
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:1:2:1] | passed | 0.02643 seconds |
|
26
|
+
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:2:1] | passed | 0.00102 seconds |
|
27
|
+
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:3:1] | passed | 0.001 seconds |
|
28
|
+
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:4:1] | passed | 0.00108 seconds |
|
29
|
+
./spec/views/catalog/_document_heatmaps.html.erb_spec.rb[1:1] | passed | 0.02604 seconds |
|
30
|
+
./spec/views/catalog/_show_leaflet_map_default.html.erb_spec.rb[1:1:1] | passed | 0.00276 seconds |
|
31
|
+
./spec/views/catalog/_show_leaflet_map_default.html.erb_spec.rb[1:2:1] | passed | 0.00097 seconds |
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
feature 'Configurable basemap', js: true do
|
3
|
+
RSpec.feature 'Configurable basemap', js: true do
|
4
4
|
scenario 'defaults to positron' do
|
5
5
|
visit search_catalog_path(q: ' ', view: 'heatmaps', search_field: 'all_fields')
|
6
6
|
expect(page).to have_css "img[src*='light_all']"
|
@@ -27,4 +27,3 @@ feature 'Configurable basemap', js: true do
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
30
|
-
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
feature 'Index page map', js: true do
|
3
|
+
RSpec.feature 'Index page map', js: true do
|
4
4
|
it 'renders a leaflet map' do
|
5
5
|
visit search_catalog_path(q: ' ', view: 'heatmaps', search_field: 'all_fields')
|
6
6
|
expect(page).to have_css '.leaflet-map-pane'
|