@hpcc-js/map 3.5.4 → 3.5.5

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 (95) 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 +8 -8
  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
package/src/Graticule.ts CHANGED
@@ -1,97 +1,97 @@
1
- import { geoGraticule as d3GeoGraticule } from "d3-geo";
2
- import { select as d3Select } from "d3-selection";
3
- import { Layer } from "./Layer.ts";
4
-
5
- import "../src/Graticule.css";
6
-
7
- export class Graticule extends Layer {
8
- _dataMap = {};
9
- _path: any = d3Select(null);
10
- _graticule;
11
- _graticulePath;
12
- _graticuleOutlinePath;
13
- _prevProjection;
14
-
15
- constructor() {
16
- super();
17
- }
18
-
19
- layerEnter(base, svgElement, domElement) {
20
- Layer.prototype.layerEnter.apply(this, arguments);
21
-
22
- this._graticule = d3GeoGraticule();
23
- this._graticulePath = svgElement.append("path")
24
- .datum(this._graticule)
25
- .attr("class", "graticule")
26
- .attr("vector-effect", "non-scaling-stroke")
27
- ;
28
- this._graticuleOutlinePath = svgElement.append("path")
29
- .datum(this._graticule.outline)
30
- .attr("class", "graticuleOutline")
31
- .attr("vector-effect", "non-scaling-stroke")
32
- ;
33
- }
34
-
35
- layerUpdate(base) {
36
- if (!this.visible()) {
37
- this._graticulePath.attr("d", "");
38
- this._graticuleOutlinePath.attr("d", "");
39
- delete this._prevProjection;
40
- return;
41
- }
42
-
43
- if (this._prevProjection !== base.projection()) {
44
- this._graticulePath
45
- .attr("d", base._d3GeoPath)
46
- ;
47
- this._graticuleOutlinePath
48
- .attr("d", base._d3GeoPath)
49
- ;
50
- this._prevProjection = base.projection();
51
- }
52
- this._graticulePath
53
- .style("stroke", this.meshColor())
54
- ;
55
- this._graticuleOutlinePath
56
- .style("stroke", this.meshColor())
57
- ;
58
- }
59
-
60
- layerExit(base) {
61
- delete this._prevProjection;
62
- }
63
-
64
- /*
65
- layerZoomed(base) {
66
- this._graticulePath
67
- .style("opacity", this.opacity())
68
- .attr("transform", "translate(" + base._zoom.translate() + ")scale(" + base._zoom.scale() + ")")
69
- .style("stroke-width", this.meshStrokeWidth() / base._zoom.scale() + "px")
70
- ;
71
- this._graticuleOutlinePath
72
- .style("opacity", this.opacity())
73
- .attr("transform", "translate(" + base._zoom.translate() + ")scale(" + base._zoom.scale() + ")")
74
- .style("stroke-width", this.meshStrokeWidth() / base._zoom.scale() + "px")
75
- ;
76
- }
77
- */
78
- }
79
- Graticule.prototype._class += " map_Graticule";
80
-
81
- export interface Graticule {
82
- opacity(): number;
83
- opacity(_: number): this;
84
- opacity_exists(): boolean;
85
-
86
- meshColor(): string;
87
- meshColor(_: string): this;
88
- meshColor_exists(): boolean;
89
- meshStrokeWidth(): number;
90
- meshStrokeWidth(_: number): this;
91
- meshStrokeWidth_exists(): boolean;
92
- }
93
-
94
- Graticule.prototype.publish("opacity", 1.0, "number", "Opacity", null, { tags: ["Advanced"] });
95
-
96
- Graticule.prototype.publish("meshColor", null, "html-color", "Stroke Color", null, { optional: true });
97
- Graticule.prototype.publish("meshStrokeWidth", 0.25, "number", "Stroke Width");
1
+ import { geoGraticule as d3GeoGraticule } from "d3-geo";
2
+ import { select as d3Select } from "d3-selection";
3
+ import { Layer } from "./Layer.ts";
4
+
5
+ import "../src/Graticule.css";
6
+
7
+ export class Graticule extends Layer {
8
+ _dataMap = {};
9
+ _path: any = d3Select(null);
10
+ _graticule;
11
+ _graticulePath;
12
+ _graticuleOutlinePath;
13
+ _prevProjection;
14
+
15
+ constructor() {
16
+ super();
17
+ }
18
+
19
+ layerEnter(base, svgElement, domElement) {
20
+ Layer.prototype.layerEnter.apply(this, arguments);
21
+
22
+ this._graticule = d3GeoGraticule();
23
+ this._graticulePath = svgElement.append("path")
24
+ .datum(this._graticule)
25
+ .attr("class", "graticule")
26
+ .attr("vector-effect", "non-scaling-stroke")
27
+ ;
28
+ this._graticuleOutlinePath = svgElement.append("path")
29
+ .datum(this._graticule.outline)
30
+ .attr("class", "graticuleOutline")
31
+ .attr("vector-effect", "non-scaling-stroke")
32
+ ;
33
+ }
34
+
35
+ layerUpdate(base) {
36
+ if (!this.visible()) {
37
+ this._graticulePath.attr("d", "");
38
+ this._graticuleOutlinePath.attr("d", "");
39
+ delete this._prevProjection;
40
+ return;
41
+ }
42
+
43
+ if (this._prevProjection !== base.projection()) {
44
+ this._graticulePath
45
+ .attr("d", base._d3GeoPath)
46
+ ;
47
+ this._graticuleOutlinePath
48
+ .attr("d", base._d3GeoPath)
49
+ ;
50
+ this._prevProjection = base.projection();
51
+ }
52
+ this._graticulePath
53
+ .style("stroke", this.meshColor())
54
+ ;
55
+ this._graticuleOutlinePath
56
+ .style("stroke", this.meshColor())
57
+ ;
58
+ }
59
+
60
+ layerExit(base) {
61
+ delete this._prevProjection;
62
+ }
63
+
64
+ /*
65
+ layerZoomed(base) {
66
+ this._graticulePath
67
+ .style("opacity", this.opacity())
68
+ .attr("transform", "translate(" + base._zoom.translate() + ")scale(" + base._zoom.scale() + ")")
69
+ .style("stroke-width", this.meshStrokeWidth() / base._zoom.scale() + "px")
70
+ ;
71
+ this._graticuleOutlinePath
72
+ .style("opacity", this.opacity())
73
+ .attr("transform", "translate(" + base._zoom.translate() + ")scale(" + base._zoom.scale() + ")")
74
+ .style("stroke-width", this.meshStrokeWidth() / base._zoom.scale() + "px")
75
+ ;
76
+ }
77
+ */
78
+ }
79
+ Graticule.prototype._class += " map_Graticule";
80
+
81
+ export interface Graticule {
82
+ opacity(): number;
83
+ opacity(_: number): this;
84
+ opacity_exists(): boolean;
85
+
86
+ meshColor(): string;
87
+ meshColor(_: string): this;
88
+ meshColor_exists(): boolean;
89
+ meshStrokeWidth(): number;
90
+ meshStrokeWidth(_: number): this;
91
+ meshStrokeWidth_exists(): boolean;
92
+ }
93
+
94
+ Graticule.prototype.publish("opacity", 1.0, "number", "Opacity", null, { tags: ["Advanced"] });
95
+
96
+ Graticule.prototype.publish("meshColor", null, "html-color", "Stroke Color", null, { optional: true });
97
+ Graticule.prototype.publish("meshStrokeWidth", 0.25, "number", "Stroke Width");
package/src/Heat.ts CHANGED
@@ -1,87 +1,87 @@
1
- import { HeatMap } from "@hpcc-js/other";
2
- import { Layer } from "./Layer.ts";
3
-
4
- import "../src/Heat.css";
5
-
6
- export class Heat extends Layer {
7
- _heatTransform;
8
- heat;
9
- _prevProjection;
10
-
11
- constructor() {
12
- super();
13
- }
14
-
15
- layerEnter(base, svgElement, domElement) {
16
- Layer.prototype.layerEnter.apply(this, arguments);
17
- this._parentOverlay.style("pointer-events", "none");
18
- this._heatTransform = domElement
19
- .style("pointer-events", "none")
20
- .append("div")
21
- .attr("class", this.classID())
22
- .style("width", base.width() + "px")
23
- .style("height", base.height() + "px")
24
- ;
25
- this.heat = new HeatMap()
26
- .target(this._heatTransform.node())
27
- ;
28
- }
29
-
30
- layerUpdate(base) {
31
- Layer.prototype.layerUpdate.apply(this, arguments);
32
-
33
- this._heatTransform
34
- .style("opacity", this.opacity())
35
- .style("width", base.width() + "px")
36
- .style("height", base.height() + "px")
37
- ;
38
- this.heat.resize(base.size());
39
- this.layerZoomed(base);
40
- }
41
-
42
- layerExit(base) {
43
- delete this._prevProjection;
44
- this.heat.target(null);
45
- delete this.heat;
46
- }
47
-
48
- layerZoomed(base) {
49
- Layer.prototype.layerZoomed.apply(this, arguments);
50
- const latField = this._db.fieldByLabel(this.latColumn());
51
- const longField = this._db.fieldByLabel(this.longColumn());
52
- this.heat
53
- .columns(this.columns())
54
- .data(this.visible() ? this.data().map(function (row) {
55
- const lat = latField ? row[latField.idx] : row[0];
56
- const long = longField ? row[longField.idx] : row[1];
57
- const transform = base.zoomTranslate();
58
- const pos = base.project(lat, long);
59
- const scale = base.zoomScale();
60
- pos[0] *= scale;
61
- pos[1] *= scale;
62
- return [transform[0] + pos[0], transform[1] + pos[1], row[4] || 0.5];
63
- }) : [])
64
- .render()
65
- ;
66
- }
67
- }
68
- Heat.prototype._class += " map_Heat";
69
-
70
- export interface Heat {
71
- latColumn(): string;
72
- latColumn(_: string): this;
73
- latColumn_exists(): boolean;
74
- longColumn(): string;
75
- longColumn(_: string): this;
76
- longColumn_exists(): boolean;
77
- opacity(): number;
78
- opacity(_: number): this;
79
- opacity_exists(): boolean;
80
- }
81
-
82
- Heat.prototype.publish("latColumn", null, "set", "Latitude column", function () { return this.columns(); }, { optional: true });
83
- Heat.prototype.publish("longColumn", null, "set", "Longitude column", function () { return this.columns(); }, { optional: true });
84
- Heat.prototype.publish("opacity", 1.0, "number", "Opacity", null, { tags: ["Advanced"] });
85
-
86
- // Heat.prototype.publish("meshColor", null, "html-color", "Stroke Color", null, { optional: true });
87
- // Heat.prototype.publish("meshStrokeWidth", 0.25, "number", "Stroke Width");
1
+ import { HeatMap } from "@hpcc-js/other";
2
+ import { Layer } from "./Layer.ts";
3
+
4
+ import "../src/Heat.css";
5
+
6
+ export class Heat extends Layer {
7
+ _heatTransform;
8
+ heat;
9
+ _prevProjection;
10
+
11
+ constructor() {
12
+ super();
13
+ }
14
+
15
+ layerEnter(base, svgElement, domElement) {
16
+ Layer.prototype.layerEnter.apply(this, arguments);
17
+ this._parentOverlay.style("pointer-events", "none");
18
+ this._heatTransform = domElement
19
+ .style("pointer-events", "none")
20
+ .append("div")
21
+ .attr("class", this.classID())
22
+ .style("width", base.width() + "px")
23
+ .style("height", base.height() + "px")
24
+ ;
25
+ this.heat = new HeatMap()
26
+ .target(this._heatTransform.node())
27
+ ;
28
+ }
29
+
30
+ layerUpdate(base) {
31
+ Layer.prototype.layerUpdate.apply(this, arguments);
32
+
33
+ this._heatTransform
34
+ .style("opacity", this.opacity())
35
+ .style("width", base.width() + "px")
36
+ .style("height", base.height() + "px")
37
+ ;
38
+ this.heat.resize(base.size());
39
+ this.layerZoomed(base);
40
+ }
41
+
42
+ layerExit(base) {
43
+ delete this._prevProjection;
44
+ this.heat.target(null);
45
+ delete this.heat;
46
+ }
47
+
48
+ layerZoomed(base) {
49
+ Layer.prototype.layerZoomed.apply(this, arguments);
50
+ const latField = this._db.fieldByLabel(this.latColumn());
51
+ const longField = this._db.fieldByLabel(this.longColumn());
52
+ this.heat
53
+ .columns(this.columns())
54
+ .data(this.visible() ? this.data().map(function (row) {
55
+ const lat = latField ? row[latField.idx] : row[0];
56
+ const long = longField ? row[longField.idx] : row[1];
57
+ const transform = base.zoomTranslate();
58
+ const pos = base.project(lat, long);
59
+ const scale = base.zoomScale();
60
+ pos[0] *= scale;
61
+ pos[1] *= scale;
62
+ return [transform[0] + pos[0], transform[1] + pos[1], row[4] || 0.5];
63
+ }) : [])
64
+ .render()
65
+ ;
66
+ }
67
+ }
68
+ Heat.prototype._class += " map_Heat";
69
+
70
+ export interface Heat {
71
+ latColumn(): string;
72
+ latColumn(_: string): this;
73
+ latColumn_exists(): boolean;
74
+ longColumn(): string;
75
+ longColumn(_: string): this;
76
+ longColumn_exists(): boolean;
77
+ opacity(): number;
78
+ opacity(_: number): this;
79
+ opacity_exists(): boolean;
80
+ }
81
+
82
+ Heat.prototype.publish("latColumn", null, "set", "Latitude column", function () { return this.columns(); }, { optional: true });
83
+ Heat.prototype.publish("longColumn", null, "set", "Longitude column", function () { return this.columns(); }, { optional: true });
84
+ Heat.prototype.publish("opacity", 1.0, "number", "Opacity", null, { tags: ["Advanced"] });
85
+
86
+ // Heat.prototype.publish("meshColor", null, "html-color", "Stroke Color", null, { optional: true });
87
+ // Heat.prototype.publish("meshStrokeWidth", 0.25, "number", "Stroke Width");
@@ -1,8 +1,8 @@
1
- import { Palette } from "@hpcc-js/common";
2
- export function IChoropleth() {
3
- }
4
- IChoropleth.prototype._palette = Palette.rainbow("default");
5
-
6
- // Events ---
7
- IChoropleth.prototype.click = function (row, column, selected) {
8
- };
1
+ import { Palette } from "@hpcc-js/common";
2
+ export function IChoropleth() {
3
+ }
4
+ IChoropleth.prototype._palette = Palette.rainbow("default");
5
+
6
+ // Events ---
7
+ IChoropleth.prototype.click = function (row, column, selected) {
8
+ };
package/src/Layer.ts CHANGED
@@ -1,99 +1,99 @@
1
- import { ITooltip } from "@hpcc-js/api";
2
- import { Layered } from "./Layered.ts";
3
-
4
- export class Layer extends Layered {
5
- _svgElement;
6
- _domElement;
7
- _topoJsonPromise;
8
-
9
- constructor() {
10
- super();
11
- ITooltip.call(this);
12
- }
13
-
14
- // Disable Glow For Layers ---
15
- svgGlowID(): string {
16
- return "";
17
- }
18
-
19
- layerEnter(base, svgElement, domElement) {
20
- this._parentOverlay = base._parentOverlay;
21
- }
22
-
23
- enter(domNode, element) {
24
- super.enter(domNode, element);
25
- this._svgElement = this._layersTarget.append("g");
26
- this._domElement = this._parentOverlay.append("div");
27
- this.layerEnter(this, this._svgElement, this._domElement);
28
- }
29
-
30
- layerUpdate(base, forcePath?) {
31
- }
32
-
33
- update(domNode, element) {
34
- super.update(domNode, element);
35
- this.layerUpdate(this);
36
- }
37
-
38
- onZoomed() {
39
- super.onZoomed();
40
- this.layerUpdate(this);
41
- }
42
-
43
- layerExit(base) {
44
- }
45
-
46
- exit(domNode, element) {
47
- this.layerExit(this);
48
- this._svgElement.remove();
49
- this._domElement.remove();
50
- super.exit(domNode, element);
51
- }
52
-
53
- layerPreRender() {
54
- return Promise.resolve();
55
- }
56
-
57
- render(callback?: (w: this) => void): this {
58
- const context = this;
59
- const args = arguments;
60
- this.layerPreRender().then(function () {
61
- Layered.prototype.render.apply(context, args);
62
- });
63
- return this;
64
- }
65
-
66
- layerZoomed(base) {
67
- }
68
- }
69
- Layer.prototype._class += " map_Layer";
70
- Layer.prototype.implements(ITooltip.prototype);
71
-
72
- export interface Layer {
73
- // ITooltip ---
74
- tooltip: any;
75
-
76
- tooltipHTML(_: any): any;
77
- tooltipFormat(opts: any): string;
78
- tooltipStyle(): string;
79
- tooltipStyle(_: string): Layer;
80
- tooltipStyle_exists(): boolean;
81
- tooltipValueFormat(): string;
82
- tooltipValueFormat(_: string): Layer;
83
- tooltipValueFormat_exists(): boolean;
84
- tooltipSeriesColor(): string;
85
- tooltipSeriesColor(_: string): Layer;
86
- tooltipSeriesColor_exists(): boolean;
87
- tooltipLabelColor(): string;
88
- tooltipLabelColor(_: string): Layer;
89
- tooltipLabelColor_exists(): boolean;
90
- tooltipValueColor(): string;
91
- tooltipValueColor(_: string): Layer;
92
- tooltipValueColor_exists(): boolean;
93
- tooltipTick(): boolean;
94
- tooltipTick(_: boolean): Layer;
95
- tooltipTick_exists(): boolean;
96
- tooltipOffset(): number;
97
- tooltipOffset(_: number): Layer;
98
- tooltipOffset_exists(): boolean;
99
- }
1
+ import { ITooltip } from "@hpcc-js/api";
2
+ import { Layered } from "./Layered.ts";
3
+
4
+ export class Layer extends Layered {
5
+ _svgElement;
6
+ _domElement;
7
+ _topoJsonPromise;
8
+
9
+ constructor() {
10
+ super();
11
+ ITooltip.call(this);
12
+ }
13
+
14
+ // Disable Glow For Layers ---
15
+ svgGlowID(): string {
16
+ return "";
17
+ }
18
+
19
+ layerEnter(base, svgElement, domElement) {
20
+ this._parentOverlay = base._parentOverlay;
21
+ }
22
+
23
+ enter(domNode, element) {
24
+ super.enter(domNode, element);
25
+ this._svgElement = this._layersTarget.append("g");
26
+ this._domElement = this._parentOverlay.append("div");
27
+ this.layerEnter(this, this._svgElement, this._domElement);
28
+ }
29
+
30
+ layerUpdate(base, forcePath?) {
31
+ }
32
+
33
+ update(domNode, element) {
34
+ super.update(domNode, element);
35
+ this.layerUpdate(this);
36
+ }
37
+
38
+ onZoomed() {
39
+ super.onZoomed();
40
+ this.layerUpdate(this);
41
+ }
42
+
43
+ layerExit(base) {
44
+ }
45
+
46
+ exit(domNode, element) {
47
+ this.layerExit(this);
48
+ this._svgElement.remove();
49
+ this._domElement.remove();
50
+ super.exit(domNode, element);
51
+ }
52
+
53
+ layerPreRender() {
54
+ return Promise.resolve();
55
+ }
56
+
57
+ render(callback?: (w: this) => void): this {
58
+ const context = this;
59
+ const args = arguments;
60
+ this.layerPreRender().then(function () {
61
+ Layered.prototype.render.apply(context, args);
62
+ });
63
+ return this;
64
+ }
65
+
66
+ layerZoomed(base) {
67
+ }
68
+ }
69
+ Layer.prototype._class += " map_Layer";
70
+ Layer.prototype.implements(ITooltip.prototype);
71
+
72
+ export interface Layer {
73
+ // ITooltip ---
74
+ tooltip: any;
75
+
76
+ tooltipHTML(_: any): any;
77
+ tooltipFormat(opts: any): string;
78
+ tooltipStyle(): string;
79
+ tooltipStyle(_: string): Layer;
80
+ tooltipStyle_exists(): boolean;
81
+ tooltipValueFormat(): string;
82
+ tooltipValueFormat(_: string): Layer;
83
+ tooltipValueFormat_exists(): boolean;
84
+ tooltipSeriesColor(): string;
85
+ tooltipSeriesColor(_: string): Layer;
86
+ tooltipSeriesColor_exists(): boolean;
87
+ tooltipLabelColor(): string;
88
+ tooltipLabelColor(_: string): Layer;
89
+ tooltipLabelColor_exists(): boolean;
90
+ tooltipValueColor(): string;
91
+ tooltipValueColor(_: string): Layer;
92
+ tooltipValueColor_exists(): boolean;
93
+ tooltipTick(): boolean;
94
+ tooltipTick(_: boolean): Layer;
95
+ tooltipTick_exists(): boolean;
96
+ tooltipOffset(): number;
97
+ tooltipOffset(_: number): Layer;
98
+ tooltipOffset_exists(): boolean;
99
+ }
package/src/Layered.css CHANGED
@@ -1,19 +1,19 @@
1
- .map_Layered .background {
2
- fill: none;
3
- }
4
-
5
- .map_Layered .raster image {
6
- fill: #B5D0D0
7
- }
8
-
9
- .map_Layered .vector {
10
- fill: none;
11
- stroke: navy;
12
- stroke-linejoin: round;
13
- }
14
-
15
- .map_Layered .hash path {
16
- fill: none;
17
- stroke: red;
18
- stroke-linejoin: round;
1
+ .map_Layered .background {
2
+ fill: none;
3
+ }
4
+
5
+ .map_Layered .raster image {
6
+ fill: #B5D0D0
7
+ }
8
+
9
+ .map_Layered .vector {
10
+ fill: none;
11
+ stroke: navy;
12
+ stroke-linejoin: round;
13
+ }
14
+
15
+ .map_Layered .hash path {
16
+ fill: none;
17
+ stroke: red;
18
+ stroke-linejoin: round;
19
19
  }