@lgv/heatmap 0.0.4 → 0.0.6

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lgv/heatmap",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "type": "module",
5
5
  "description": "ES6 heatmap visualization for leaflet using vega/d3.js.",
6
6
  "main": "src/index.js",
@@ -44,10 +44,10 @@
44
44
  "webpack-dev-server": "^5.0.4"
45
45
  },
46
46
  "dependencies": {
47
- "@deck.gl/core": "^9.0.34",
48
- "@deck.gl/layers": "^9.0.34",
49
- "@lgv/visualization-map": "^1.0.3",
50
- "@luma.gl/core": "^9.0.27",
47
+ "@deck.gl/core": "9.0.34",
48
+ "@deck.gl/layers": "9.0.34",
49
+ "@lgv/visualization-map": "^1.0.4",
50
+ "@luma.gl/core": "9.0.27",
51
51
  "@msrvida/vega-deck.gl": "^3.3.6",
52
52
  "d3-scale": "^4.0.2",
53
53
  "leaflet": "^1.9.4",
@@ -64,7 +64,7 @@ class Heatmap extends VisualizationMap {
64
64
 
65
65
  // generate vega specification
66
66
  let spec = this.generateSpecification();
67
-
67
+
68
68
  // render vega with deck.gl
69
69
  let view = new VegaDeckGl.ViewGl(vega.parse(spec))
70
70
  .renderer("deck.gl")
@@ -104,8 +104,6 @@ class Heatmap extends VisualizationMap {
104
104
  */
105
105
  generateSpecification() {
106
106
 
107
- let mark = this.mark(this.map.getZoom());
108
-
109
107
  // register custom scheme
110
108
  vega.scheme(this.name, this.color);
111
109
 
@@ -116,7 +114,7 @@ class Heatmap extends VisualizationMap {
116
114
  scales: [
117
115
  {
118
116
  name: "color",
119
- type: "linear",
117
+ type: "quantize",
120
118
  domain: { data: this.name, field: "count" },
121
119
  range: { scheme: this.name, count: this.color.length }
122
120
  }
@@ -130,7 +128,7 @@ class Heatmap extends VisualizationMap {
130
128
  shape: { value: "square" },
131
129
  x: { field: "x" },
132
130
  y: { field: "y" },
133
- size: { value: mark },
131
+ size: { value: this.mark(this.map.getZoom()) },
134
132
  fill: { scale: "color", field: "count" },
135
133
  opacity: { value: 1 }
136
134
  },