@hpcc-js/map 3.5.1 → 3.5.4

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 (96) hide show
  1. package/LICENSE +43 -43
  2. package/README.md +88 -88
  3. package/TopoJSON/BR.json +122 -122
  4. package/TopoJSON/GB_idx.json +1 -1
  5. package/TopoJSON/IE_idx.json +1 -1
  6. package/TopoJSON/ND_idx.json +1 -1
  7. package/TopoJSON/countries.json +257 -257
  8. package/TopoJSON/us-counties.json +16550 -16550
  9. package/TopoJSON/us-states.json +458 -458
  10. package/dist/index.js +1 -1
  11. package/dist/index.js.map +1 -1
  12. package/dist/index.umd.cjs +1 -1
  13. package/dist/index.umd.cjs.map +1 -1
  14. package/package.json +9 -9
  15. package/src/CanvasPinLayer.ts +99 -99
  16. package/src/CanvasPins.ts +397 -397
  17. package/src/Choropleth.css +26 -26
  18. package/src/Choropleth.ts +203 -203
  19. package/src/ChoroplethContinents.ts +13 -13
  20. package/src/ChoroplethCounties.ts +111 -111
  21. package/src/ChoroplethCountries.ts +100 -100
  22. package/src/ChoroplethStates.ts +103 -103
  23. package/src/ChoroplethStatesHeat.ts +8 -8
  24. package/src/GMap.css +20 -20
  25. package/src/GMap.ts +880 -880
  26. package/src/GMapCounties.ts +93 -93
  27. package/src/GMapGraph.ts +61 -61
  28. package/src/GMapHeat.ts +27 -27
  29. package/src/GMapLayered.ts +94 -94
  30. package/src/GMapPin.ts +115 -115
  31. package/src/GMapPinLine.ts +138 -138
  32. package/src/GeoHash.css +14 -14
  33. package/src/GeoHash.ts +139 -139
  34. package/src/Graph.css +9 -9
  35. package/src/Graph.ts +98 -98
  36. package/src/Graticule.css +12 -12
  37. package/src/Graticule.ts +97 -97
  38. package/src/Heat.ts +87 -87
  39. package/src/IChoropleth.ts +8 -8
  40. package/src/Layer.ts +99 -99
  41. package/src/Layered.css +18 -18
  42. package/src/Layered.ts +206 -206
  43. package/src/Lines.css +8 -8
  44. package/src/Lines.ts +78 -78
  45. package/src/OpenStreet.css +15 -15
  46. package/src/OpenStreet.ts +126 -126
  47. package/src/Pins.css +17 -17
  48. package/src/Pins.ts +350 -350
  49. package/src/Projection.ts +42 -42
  50. package/src/TestHeatMap.ts +8 -8
  51. package/src/TopoJSONChoropleth.ts +125 -125
  52. package/src/Utility.ts +484 -484
  53. package/src/__package__.ts +3 -3
  54. package/src/index.ts +33 -33
  55. package/src/leaflet/AlbersPR.ts +48 -48
  56. package/src/leaflet/Blank.ts +9 -9
  57. package/src/leaflet/Circles.ts +139 -139
  58. package/src/leaflet/ClusterCircles.css +26 -26
  59. package/src/leaflet/ClusterCircles.ts +88 -88
  60. package/src/leaflet/Countries.ts +43 -43
  61. package/src/leaflet/DrawLayer.ts +167 -167
  62. package/src/leaflet/FeatureLayer.ts +138 -138
  63. package/src/leaflet/GMap.ts +44 -44
  64. package/src/leaflet/HeatLayer.ts +77 -77
  65. package/src/leaflet/Icons.ts +60 -60
  66. package/src/leaflet/Leaflet.css +3 -3
  67. package/src/leaflet/Leaflet.ts +239 -239
  68. package/src/leaflet/MapBox.ts +35 -35
  69. package/src/leaflet/Markers.ts +109 -109
  70. package/src/leaflet/OpenStreet.ts +27 -27
  71. package/src/leaflet/Path.ts +138 -138
  72. package/src/leaflet/Pins.ts +73 -73
  73. package/src/leaflet/Polygons.ts +113 -113
  74. package/src/leaflet/Region.ts +138 -138
  75. package/src/leaflet/Text.ts +99 -99
  76. package/src/leaflet/TileLayer.ts +81 -81
  77. package/src/leaflet/TopoJSON.ts +146 -146
  78. package/src/leaflet/US.ts +15 -15
  79. package/src/leaflet/USCounties.ts +43 -43
  80. package/src/leaflet/USStates.ts +41 -41
  81. package/src/leaflet/World.css +3 -3
  82. package/src/leaflet/World.ts +172 -172
  83. package/src/leaflet/index.ts +18 -18
  84. package/src/leaflet/leaflet-shim.ts +18 -18
  85. package/src/leaflet/plugins/BeautifyIcon.css +44 -44
  86. package/src/leaflet/plugins/BeautifyIcon.ts +190 -190
  87. package/src/leaflet/plugins/BeutifyIcon.licence +20 -20
  88. package/src/leaflet/plugins/D3SvgOverlay.css +2 -2
  89. package/src/leaflet/plugins/D3SvgOverlay.licence +20 -20
  90. package/src/leaflet/plugins/D3SvgOverlay.ts +175 -175
  91. package/src/leaflet/plugins/HeatLayer.license +21 -21
  92. package/src/leaflet/plugins/HeatLayer.ts +224 -224
  93. package/src/leaflet/plugins/Leaflet.GoogleMutant.ts +424 -424
  94. package/src/leaflet/plugins/lru_map.ts +352 -352
  95. package/src/test.ts +114 -114
  96. package/types/Layered.d.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hpcc-js/map",
3
- "version": "3.5.1",
3
+ "version": "3.5.4",
4
4
  "description": "hpcc-js - Viz Map",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.cjs",
@@ -39,15 +39,15 @@
39
39
  "update-major": "npx --yes npm-check-updates -u"
40
40
  },
41
41
  "dependencies": {
42
- "@hpcc-js/api": "^3.4.12",
43
- "@hpcc-js/common": "^3.7.2",
44
- "@hpcc-js/graph": "^3.7.1",
45
- "@hpcc-js/layout": "^3.5.7",
46
- "@hpcc-js/other": "^3.5.1",
47
- "@hpcc-js/util": "^3.5.1"
42
+ "@hpcc-js/api": "^3.4.15",
43
+ "@hpcc-js/common": "^3.7.5",
44
+ "@hpcc-js/graph": "^3.7.4",
45
+ "@hpcc-js/layout": "^3.5.10",
46
+ "@hpcc-js/other": "^3.5.4",
47
+ "@hpcc-js/util": "^3.5.4"
48
48
  },
49
49
  "devDependencies": {
50
- "@hpcc-js/esbuild-plugins": "^1.8.4",
50
+ "@hpcc-js/esbuild-plugins": "^1.8.7",
51
51
  "@types/leaflet-draw": "1.0.13",
52
52
  "@types/leaflet.heat": "0.2.5",
53
53
  "@types/leaflet.markercluster": "1.5.6",
@@ -77,5 +77,5 @@
77
77
  "url": "https://github.com/hpcc-systems/Visualization/issues"
78
78
  },
79
79
  "homepage": "https://github.com/hpcc-systems/Visualization",
80
- "gitHead": "04460c76008934053c9957c361693aac862ca7dc"
80
+ "gitHead": "f8bdd58fc6914054a2313a87bbe1257dc9720545"
81
81
  }
@@ -1,99 +1,99 @@
1
- import { CanvasPins } from "./CanvasPins.ts";
2
- import { Layer } from "./Layer.ts";
3
-
4
- export class CanvasPinLayer extends Layer {
5
- _pinsTransform;
6
- pins;
7
- _prevProjection;
8
-
9
- constructor() {
10
- super();
11
- this.pins = new CanvasPins();
12
- }
13
-
14
- layerEnter(base, svgElement, domElement) {
15
- Layer.prototype.layerEnter.apply(this, arguments);
16
- this._parentOverlay.style("pointer-events", "none");
17
- this._pinsTransform = domElement
18
- .style("pointer-events", "none")
19
- .append("div")
20
- .attr("class", this.classID())
21
- .style("width", base.width() + "px")
22
- .style("height", base.height() + "px")
23
- ;
24
- this.pins.target(this._pinsTransform.node());
25
- }
26
-
27
- layerUpdate(base) {
28
- Layer.prototype.layerUpdate.apply(this, arguments);
29
-
30
- this._pinsTransform
31
- .style("opacity", this.opacity())
32
- .style("width", base.width() + "px")
33
- .style("height", base.height() + "px")
34
- ;
35
- this.pins.resize(base.size());
36
- this.layerZoomed(base);
37
- }
38
-
39
- layerExit(base) {
40
- delete this._prevProjection;
41
- this.pins.target(null);
42
- delete this.pins;
43
- }
44
-
45
- layerZoomed(base) {
46
- Layer.prototype.layerZoomed.apply(this, arguments);
47
- const latField = this._db.fieldByLabel(this.latColumn());
48
- const longField = this._db.fieldByLabel(this.longColumn());
49
- const weightField = this._db.fieldByLabel(this.weightColumn());
50
- this.pins
51
- .columns(this.columns())
52
- .data(this.visible() ? this.data().map(function (row) {
53
- const lat = latField ? row[latField.idx] : row[0];
54
- const long = longField ? row[longField.idx] : row[1];
55
- const weight = weightField ? row[weightField.idx] : 1;
56
- const transform = base.zoomTranslate();
57
- const pos = base.project(lat, long);
58
- const scale = base.zoomScale();
59
- pos[0] *= scale;
60
- pos[1] *= scale;
61
- return [transform[0] + pos[0], transform[1] + pos[1], weight];
62
- }) : [])
63
- .render()
64
- ;
65
- }
66
- }
67
- CanvasPinLayer.prototype._class += " map_CanvasPinLayer";
68
-
69
- export interface CanvasPinLayer {
70
- latColumn(): string;
71
- latColumn(_: string): CanvasPinLayer;
72
- longColumn(): string;
73
- longColumn(_: string): CanvasPinLayer;
74
- weightColumn(): string;
75
- weightColumn(_: string): CanvasPinLayer;
76
- opacity(): number;
77
- opacity(_: number): CanvasPinLayer;
78
- opacity_exists(): boolean;
79
- }
80
-
81
- CanvasPinLayer.prototype.publishProxy("clusterMode", "pins", "clusterMode");
82
- CanvasPinLayer.prototype.publishProxy("allCircles", "pins", "allCircles");
83
- CanvasPinLayer.prototype.publishProxy("showQuadtree", "pins", "showQuadtree");
84
- CanvasPinLayer.prototype.publishProxy("useAveragePos", "pins", "useAveragePos");
85
- CanvasPinLayer.prototype.publishProxy("shrinkFontToPin", "pins", "shrinkFontToPin");
86
- CanvasPinLayer.prototype.publishProxy("enableClustering", "pins", "enableClustering");
87
- CanvasPinLayer.prototype.publishProxy("useWeightedRadius", "pins", "useWeightedRadius");
88
- CanvasPinLayer.prototype.publishProxy("radiusWeightMult", "pins", "radiusWeightMult");
89
- CanvasPinLayer.prototype.publishProxy("searchRectMult", "pins", "searchRectMult");
90
- CanvasPinLayer.prototype.publishProxy("pinHeight", "pins", "pinHeight");
91
- CanvasPinLayer.prototype.publishProxy("pinWidth", "pins", "pinWidth");
92
- CanvasPinLayer.prototype.publishProxy("pinFontFamily", "pins", "pinFontFamily");
93
- CanvasPinLayer.prototype.publishProxy("pinFontSize", "pins", "pinFontSize");
94
- CanvasPinLayer.prototype.publishProxy("arrowHeight", "pins", "arrowHeight");
95
- CanvasPinLayer.prototype.publishProxy("arrowWidth", "pins", "arrowWidth");
96
- CanvasPinLayer.prototype.publish("latColumn", null, "set", "latColumn", function () { return this.columns(); }, { optional: true });
97
- CanvasPinLayer.prototype.publish("longColumn", null, "set", "longColumn", function () { return this.columns(); }, { optional: true });
98
- CanvasPinLayer.prototype.publish("weightColumn", null, "set", "weightColumn", function () { return this.columns(); }, { optional: true });
99
- CanvasPinLayer.prototype.publish("opacity", 1.0, "number", "Opacity", null, { tags: ["Advanced"] });
1
+ import { CanvasPins } from "./CanvasPins.ts";
2
+ import { Layer } from "./Layer.ts";
3
+
4
+ export class CanvasPinLayer extends Layer {
5
+ _pinsTransform;
6
+ pins;
7
+ _prevProjection;
8
+
9
+ constructor() {
10
+ super();
11
+ this.pins = new CanvasPins();
12
+ }
13
+
14
+ layerEnter(base, svgElement, domElement) {
15
+ Layer.prototype.layerEnter.apply(this, arguments);
16
+ this._parentOverlay.style("pointer-events", "none");
17
+ this._pinsTransform = domElement
18
+ .style("pointer-events", "none")
19
+ .append("div")
20
+ .attr("class", this.classID())
21
+ .style("width", base.width() + "px")
22
+ .style("height", base.height() + "px")
23
+ ;
24
+ this.pins.target(this._pinsTransform.node());
25
+ }
26
+
27
+ layerUpdate(base) {
28
+ Layer.prototype.layerUpdate.apply(this, arguments);
29
+
30
+ this._pinsTransform
31
+ .style("opacity", this.opacity())
32
+ .style("width", base.width() + "px")
33
+ .style("height", base.height() + "px")
34
+ ;
35
+ this.pins.resize(base.size());
36
+ this.layerZoomed(base);
37
+ }
38
+
39
+ layerExit(base) {
40
+ delete this._prevProjection;
41
+ this.pins.target(null);
42
+ delete this.pins;
43
+ }
44
+
45
+ layerZoomed(base) {
46
+ Layer.prototype.layerZoomed.apply(this, arguments);
47
+ const latField = this._db.fieldByLabel(this.latColumn());
48
+ const longField = this._db.fieldByLabel(this.longColumn());
49
+ const weightField = this._db.fieldByLabel(this.weightColumn());
50
+ this.pins
51
+ .columns(this.columns())
52
+ .data(this.visible() ? this.data().map(function (row) {
53
+ const lat = latField ? row[latField.idx] : row[0];
54
+ const long = longField ? row[longField.idx] : row[1];
55
+ const weight = weightField ? row[weightField.idx] : 1;
56
+ const transform = base.zoomTranslate();
57
+ const pos = base.project(lat, long);
58
+ const scale = base.zoomScale();
59
+ pos[0] *= scale;
60
+ pos[1] *= scale;
61
+ return [transform[0] + pos[0], transform[1] + pos[1], weight];
62
+ }) : [])
63
+ .render()
64
+ ;
65
+ }
66
+ }
67
+ CanvasPinLayer.prototype._class += " map_CanvasPinLayer";
68
+
69
+ export interface CanvasPinLayer {
70
+ latColumn(): string;
71
+ latColumn(_: string): CanvasPinLayer;
72
+ longColumn(): string;
73
+ longColumn(_: string): CanvasPinLayer;
74
+ weightColumn(): string;
75
+ weightColumn(_: string): CanvasPinLayer;
76
+ opacity(): number;
77
+ opacity(_: number): CanvasPinLayer;
78
+ opacity_exists(): boolean;
79
+ }
80
+
81
+ CanvasPinLayer.prototype.publishProxy("clusterMode", "pins", "clusterMode");
82
+ CanvasPinLayer.prototype.publishProxy("allCircles", "pins", "allCircles");
83
+ CanvasPinLayer.prototype.publishProxy("showQuadtree", "pins", "showQuadtree");
84
+ CanvasPinLayer.prototype.publishProxy("useAveragePos", "pins", "useAveragePos");
85
+ CanvasPinLayer.prototype.publishProxy("shrinkFontToPin", "pins", "shrinkFontToPin");
86
+ CanvasPinLayer.prototype.publishProxy("enableClustering", "pins", "enableClustering");
87
+ CanvasPinLayer.prototype.publishProxy("useWeightedRadius", "pins", "useWeightedRadius");
88
+ CanvasPinLayer.prototype.publishProxy("radiusWeightMult", "pins", "radiusWeightMult");
89
+ CanvasPinLayer.prototype.publishProxy("searchRectMult", "pins", "searchRectMult");
90
+ CanvasPinLayer.prototype.publishProxy("pinHeight", "pins", "pinHeight");
91
+ CanvasPinLayer.prototype.publishProxy("pinWidth", "pins", "pinWidth");
92
+ CanvasPinLayer.prototype.publishProxy("pinFontFamily", "pins", "pinFontFamily");
93
+ CanvasPinLayer.prototype.publishProxy("pinFontSize", "pins", "pinFontSize");
94
+ CanvasPinLayer.prototype.publishProxy("arrowHeight", "pins", "arrowHeight");
95
+ CanvasPinLayer.prototype.publishProxy("arrowWidth", "pins", "arrowWidth");
96
+ CanvasPinLayer.prototype.publish("latColumn", null, "set", "latColumn", function () { return this.columns(); }, { optional: true });
97
+ CanvasPinLayer.prototype.publish("longColumn", null, "set", "longColumn", function () { return this.columns(); }, { optional: true });
98
+ CanvasPinLayer.prototype.publish("weightColumn", null, "set", "weightColumn", function () { return this.columns(); }, { optional: true });
99
+ CanvasPinLayer.prototype.publish("opacity", 1.0, "number", "Opacity", null, { tags: ["Advanced"] });