@hpcc-js/map 2.79.1 → 2.79.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 (89) 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.es6.js +19949 -19949
  11. package/dist/index.es6.js.map +1 -1
  12. package/dist/index.js +19947 -19947
  13. package/dist/index.js.map +1 -1
  14. package/dist/index.min.js +2 -2
  15. package/dist/index.min.js.map +1 -1
  16. package/package.json +9 -9
  17. package/src/CanvasPinLayer.ts +99 -99
  18. package/src/CanvasPins.ts +396 -396
  19. package/src/Choropleth.css +27 -27
  20. package/src/Choropleth.ts +195 -195
  21. package/src/ChoroplethContinents.ts +13 -13
  22. package/src/ChoroplethCounties.ts +109 -109
  23. package/src/ChoroplethCountries.ts +100 -100
  24. package/src/ChoroplethStates.ts +104 -104
  25. package/src/ChoroplethStatesHeat.ts +8 -8
  26. package/src/GMap.css +16 -16
  27. package/src/GMap.ts +879 -879
  28. package/src/GMapCounties.ts +93 -93
  29. package/src/GMapGraph.ts +61 -61
  30. package/src/GMapHeat.ts +27 -27
  31. package/src/GMapLayered.ts +94 -94
  32. package/src/GMapPin.ts +115 -115
  33. package/src/GMapPinLine.ts +125 -125
  34. package/src/GeoHash.css +15 -15
  35. package/src/GeoHash.ts +125 -125
  36. package/src/Graph.css +10 -10
  37. package/src/Graph.ts +98 -98
  38. package/src/Graticule.css +13 -13
  39. package/src/Graticule.ts +90 -90
  40. package/src/Heat.css +2 -2
  41. package/src/Heat.ts +82 -82
  42. package/src/IChoropleth.ts +8 -8
  43. package/src/Layer.ts +90 -90
  44. package/src/Layered.css +19 -19
  45. package/src/Layered.ts +206 -206
  46. package/src/Lines.css +9 -9
  47. package/src/Lines.ts +75 -75
  48. package/src/OpenStreet.css +15 -15
  49. package/src/OpenStreet.ts +123 -123
  50. package/src/Pins.css +18 -18
  51. package/src/Pins.ts +319 -319
  52. package/src/Projection.ts +42 -42
  53. package/src/TestHeatMap.ts +8 -8
  54. package/src/TopoJSONChoropleth.ts +114 -114
  55. package/src/Utility.ts +482 -482
  56. package/src/__package__.ts +3 -3
  57. package/src/index.ts +34 -34
  58. package/src/leaflet/AlbersPR.ts +48 -48
  59. package/src/leaflet/Blank.ts +9 -9
  60. package/src/leaflet/Circles.ts +139 -139
  61. package/src/leaflet/ClusterCircles.css +26 -26
  62. package/src/leaflet/ClusterCircles.ts +88 -88
  63. package/src/leaflet/Countries.ts +43 -43
  64. package/src/leaflet/DrawLayer.ts +167 -167
  65. package/src/leaflet/FeatureLayer.ts +138 -138
  66. package/src/leaflet/GMap.ts +44 -44
  67. package/src/leaflet/HeatLayer.ts +77 -77
  68. package/src/leaflet/Icons.ts +60 -60
  69. package/src/leaflet/Leaflet.css +3 -3
  70. package/src/leaflet/Leaflet.ts +238 -238
  71. package/src/leaflet/MapBox.ts +35 -35
  72. package/src/leaflet/Markers.ts +109 -109
  73. package/src/leaflet/OpenStreet.ts +27 -27
  74. package/src/leaflet/Path.ts +138 -138
  75. package/src/leaflet/Pins.ts +73 -73
  76. package/src/leaflet/Polygons.ts +113 -113
  77. package/src/leaflet/Region.ts +138 -138
  78. package/src/leaflet/Text.ts +99 -99
  79. package/src/leaflet/TileLayer.ts +81 -81
  80. package/src/leaflet/TopoJSON.ts +146 -146
  81. package/src/leaflet/US.ts +15 -15
  82. package/src/leaflet/USCounties.ts +43 -43
  83. package/src/leaflet/USStates.ts +41 -41
  84. package/src/leaflet/World.css +3 -3
  85. package/src/leaflet/World.ts +171 -171
  86. package/src/leaflet/index.ts +18 -18
  87. package/src/test.ts +114 -114
  88. package/types/__package__.d.ts +2 -2
  89. package/types-3.4/__package__.d.ts +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hpcc-js/map",
3
- "version": "2.79.1",
3
+ "version": "2.79.3",
4
4
  "description": "hpcc-js - Viz Map",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es6",
@@ -39,13 +39,13 @@
39
39
  "update": "npx --yes npm-check-updates -u -t minor"
40
40
  },
41
41
  "dependencies": {
42
- "@hpcc-js/api": "^2.14.1",
43
- "@hpcc-js/common": "^2.73.1",
44
- "@hpcc-js/graph": "^2.87.1",
45
- "@hpcc-js/layout": "^2.51.1",
46
- "@hpcc-js/leaflet-shim": "^2.5.0",
47
- "@hpcc-js/other": "^2.17.1",
48
- "@hpcc-js/util": "^2.53.1"
42
+ "@hpcc-js/api": "^2.14.3",
43
+ "@hpcc-js/common": "^2.73.3",
44
+ "@hpcc-js/graph": "^2.87.3",
45
+ "@hpcc-js/layout": "^2.51.3",
46
+ "@hpcc-js/leaflet-shim": "^2.6.1",
47
+ "@hpcc-js/other": "^2.17.3",
48
+ "@hpcc-js/util": "^2.53.3"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@hpcc-js/bundle": "^2.12.0",
@@ -72,5 +72,5 @@
72
72
  "url": "https://github.com/hpcc-systems/Visualization/issues"
73
73
  },
74
74
  "homepage": "https://github.com/hpcc-systems/Visualization",
75
- "gitHead": "9f7febd34d32c62d1785e7863334773e1967d738"
75
+ "gitHead": "0907b8d15d369c89483954a1d96e2247ba020cb6"
76
76
  }
@@ -1,99 +1,99 @@
1
- import { CanvasPins } from "./CanvasPins";
2
- import { Layer } from "./Layer";
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";
2
+ import { Layer } from "./Layer";
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"] });