@hpcc-js/map 3.4.10 → 3.4.11

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 +7 -7
  15. package/src/CanvasPinLayer.ts +99 -99
  16. package/src/CanvasPins.ts +397 -397
  17. package/src/Choropleth.css +27 -27
  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 +16 -16
  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 +15 -15
  33. package/src/GeoHash.ts +139 -139
  34. package/src/Graph.css +10 -10
  35. package/src/Graph.ts +98 -98
  36. package/src/Graticule.css +13 -13
  37. package/src/Graticule.ts +97 -97
  38. package/src/Heat.css +2 -2
  39. package/src/Heat.ts +87 -87
  40. package/src/IChoropleth.ts +8 -8
  41. package/src/Layer.ts +99 -99
  42. package/src/Layered.css +19 -19
  43. package/src/Layered.ts +206 -206
  44. package/src/Lines.css +9 -9
  45. package/src/Lines.ts +78 -78
  46. package/src/OpenStreet.css +15 -15
  47. package/src/OpenStreet.ts +126 -126
  48. package/src/Pins.css +18 -18
  49. package/src/Pins.ts +350 -350
  50. package/src/Projection.ts +42 -42
  51. package/src/TestHeatMap.ts +8 -8
  52. package/src/TopoJSONChoropleth.ts +125 -125
  53. package/src/Utility.ts +484 -484
  54. package/src/__package__.ts +3 -3
  55. package/src/index.ts +33 -33
  56. package/src/leaflet/AlbersPR.ts +48 -48
  57. package/src/leaflet/Blank.ts +9 -9
  58. package/src/leaflet/Circles.ts +139 -139
  59. package/src/leaflet/ClusterCircles.css +26 -26
  60. package/src/leaflet/ClusterCircles.ts +88 -88
  61. package/src/leaflet/Countries.ts +43 -43
  62. package/src/leaflet/DrawLayer.ts +167 -167
  63. package/src/leaflet/FeatureLayer.ts +138 -138
  64. package/src/leaflet/GMap.ts +44 -44
  65. package/src/leaflet/HeatLayer.ts +77 -77
  66. package/src/leaflet/Icons.ts +60 -60
  67. package/src/leaflet/Leaflet.css +3 -3
  68. package/src/leaflet/Leaflet.ts +239 -239
  69. package/src/leaflet/MapBox.ts +35 -35
  70. package/src/leaflet/Markers.ts +109 -109
  71. package/src/leaflet/OpenStreet.ts +27 -27
  72. package/src/leaflet/Path.ts +138 -138
  73. package/src/leaflet/Pins.ts +73 -73
  74. package/src/leaflet/Polygons.ts +113 -113
  75. package/src/leaflet/Region.ts +138 -138
  76. package/src/leaflet/Text.ts +99 -99
  77. package/src/leaflet/TileLayer.ts +81 -81
  78. package/src/leaflet/TopoJSON.ts +146 -146
  79. package/src/leaflet/US.ts +15 -15
  80. package/src/leaflet/USCounties.ts +43 -43
  81. package/src/leaflet/USStates.ts +41 -41
  82. package/src/leaflet/World.css +3 -3
  83. package/src/leaflet/World.ts +172 -172
  84. package/src/leaflet/index.ts +18 -18
  85. package/src/leaflet/leaflet-shim.ts +18 -18
  86. package/src/leaflet/plugins/BeautifyIcon.css +44 -44
  87. package/src/leaflet/plugins/BeautifyIcon.ts +190 -190
  88. package/src/leaflet/plugins/BeutifyIcon.licence +20 -20
  89. package/src/leaflet/plugins/D3SvgOverlay.css +3 -3
  90. package/src/leaflet/plugins/D3SvgOverlay.licence +20 -20
  91. package/src/leaflet/plugins/D3SvgOverlay.ts +175 -175
  92. package/src/leaflet/plugins/HeatLayer.license +21 -21
  93. package/src/leaflet/plugins/HeatLayer.ts +224 -224
  94. package/src/leaflet/plugins/Leaflet.GoogleMutant.ts +424 -424
  95. package/src/leaflet/plugins/lru_map.ts +352 -352
  96. package/src/test.ts +114 -114
@@ -1,138 +1,138 @@
1
- import { HTMLWidget, select as d3Select, Utility } from "@hpcc-js/common";
2
- import { D3SvgOverlay, FeatureGroup, LatLngBounds, LeafletEvent, Map, MarkerClusterGroup } from "./leaflet-shim.ts";
3
- import { Leaflet } from "./Leaflet.ts";
4
- import { ILayer } from "./TileLayer.ts";
5
-
6
- export class FeatureLayer extends Leaflet implements ILayer {
7
- protected _layer: FeatureGroup | MarkerClusterGroup;
8
- protected _selection: Utility.SimpleSelection;
9
-
10
- constructor(cluster = false) {
11
- super();
12
- this._layer = cluster ? new MarkerClusterGroup() : new FeatureGroup();
13
- (this._layer as any).__hpcc_layer = this;
14
- Utility.SimpleSelectionMixin.call(this);
15
- this.layers([this]);
16
- }
17
-
18
- // Enable propertyArray support ---
19
- owner(_: HTMLWidget) {
20
- this._owner = _;
21
- }
22
-
23
- valid() {
24
- return true;
25
- }
26
-
27
- clear() {
28
- this._layer.clearLayers();
29
- }
30
-
31
- add(layer) {
32
- this._layer.addLayer(layer);
33
- }
34
-
35
- maxZoom() {
36
- return (this._owner as any)._leafletMap.getMaxZoom() || 24;
37
- }
38
-
39
- zoom() {
40
- return (this._owner as any)._leafletMap.getZoom();
41
- }
42
-
43
- visibleBounds() {
44
- return (this._owner as any)._leafletMap.getBounds();
45
- }
46
-
47
- // ILayer ---
48
- protected _initPromise;
49
- init(): Promise<void> {
50
- if (!this._initPromise) {
51
- this._initPromise = Promise.resolve();
52
- }
53
- return this._initPromise;
54
- }
55
-
56
- hasBounds(): boolean {
57
- return false;
58
- }
59
-
60
- getBounds(): LatLngBounds {
61
- return this._layer.getBounds();
62
- }
63
-
64
- style(id: string, _?: number | string | boolean): this | number | string | boolean {
65
- if (_ === void 0) return d3Select(this._layer.getPane()).style(id);
66
- d3Select(this._layer.getPane()).style(id, _);
67
- return this;
68
- }
69
-
70
- protected propValue(colIdx, row, defaultValue) {
71
- return (colIdx < 0 ? defaultValue : row[colIdx]) || defaultValue;
72
- }
73
-
74
- layerEnter(map: Map) {
75
- map.addLayer(this._layer);
76
- const elem = d3Select(map.getContainer()).select(".leaflet-pane.leaflet-marker-pane");
77
- this._selection.widgetElement(elem);
78
- }
79
-
80
- layerUpdate(map: Map) {
81
- }
82
-
83
- layerExit(map: Map) {
84
- this._layer.clearLayers();
85
- map.removeLayer(this._layer);
86
- }
87
-
88
- // Events ---
89
- zoomEnd(e: LeafletEvent) {
90
- }
91
-
92
- moveEnd(e: LeafletEvent) {
93
- }
94
-
95
- viewReset(e: LeafletEvent) {
96
- }
97
-
98
- }
99
- FeatureLayer.prototype._class += " map_FeatureLayer";
100
- FeatureLayer.prototype.mixin(Utility.SimpleSelectionMixin);
101
- FeatureLayer.prototype.publishReset(["layers"]);
102
-
103
- // ---------------------------------------------------------------------------
104
- export class ClusterLayer extends FeatureLayer {
105
-
106
- constructor(cluster = true) {
107
- super(cluster);
108
- }
109
- }
110
- ClusterLayer.prototype._class += " map_ClusterLayer";
111
-
112
- // ---------------------------------------------------------------------------
113
- export class D3SurfaceLayer extends FeatureLayer {
114
-
115
- protected _lfd3 = new D3SvgOverlay()
116
- .drawCallback((selection, projection) => this.layerUpdate(undefined, projection));
117
-
118
- hasBounds(): boolean {
119
- return true;
120
- }
121
-
122
- getBounds() {
123
- return this._lfd3.getBounds();
124
- }
125
-
126
- layerEnter(map: Map) {
127
- super.layerEnter(map);
128
- this.add(this._lfd3);
129
- }
130
-
131
- layerUpdate(map: Map, projection?) {
132
- super.layerUpdate(map);
133
- }
134
-
135
- // Events ---
136
- clickHandler(e, row) {
137
- }
138
- }
1
+ import { HTMLWidget, select as d3Select, Utility } from "@hpcc-js/common";
2
+ import { D3SvgOverlay, FeatureGroup, LatLngBounds, LeafletEvent, Map, MarkerClusterGroup } from "./leaflet-shim.ts";
3
+ import { Leaflet } from "./Leaflet.ts";
4
+ import { ILayer } from "./TileLayer.ts";
5
+
6
+ export class FeatureLayer extends Leaflet implements ILayer {
7
+ protected _layer: FeatureGroup | MarkerClusterGroup;
8
+ protected _selection: Utility.SimpleSelection;
9
+
10
+ constructor(cluster = false) {
11
+ super();
12
+ this._layer = cluster ? new MarkerClusterGroup() : new FeatureGroup();
13
+ (this._layer as any).__hpcc_layer = this;
14
+ Utility.SimpleSelectionMixin.call(this);
15
+ this.layers([this]);
16
+ }
17
+
18
+ // Enable propertyArray support ---
19
+ owner(_: HTMLWidget) {
20
+ this._owner = _;
21
+ }
22
+
23
+ valid() {
24
+ return true;
25
+ }
26
+
27
+ clear() {
28
+ this._layer.clearLayers();
29
+ }
30
+
31
+ add(layer) {
32
+ this._layer.addLayer(layer);
33
+ }
34
+
35
+ maxZoom() {
36
+ return (this._owner as any)._leafletMap.getMaxZoom() || 24;
37
+ }
38
+
39
+ zoom() {
40
+ return (this._owner as any)._leafletMap.getZoom();
41
+ }
42
+
43
+ visibleBounds() {
44
+ return (this._owner as any)._leafletMap.getBounds();
45
+ }
46
+
47
+ // ILayer ---
48
+ protected _initPromise;
49
+ init(): Promise<void> {
50
+ if (!this._initPromise) {
51
+ this._initPromise = Promise.resolve();
52
+ }
53
+ return this._initPromise;
54
+ }
55
+
56
+ hasBounds(): boolean {
57
+ return false;
58
+ }
59
+
60
+ getBounds(): LatLngBounds {
61
+ return this._layer.getBounds();
62
+ }
63
+
64
+ style(id: string, _?: number | string | boolean): this | number | string | boolean {
65
+ if (_ === void 0) return d3Select(this._layer.getPane()).style(id);
66
+ d3Select(this._layer.getPane()).style(id, _);
67
+ return this;
68
+ }
69
+
70
+ protected propValue(colIdx, row, defaultValue) {
71
+ return (colIdx < 0 ? defaultValue : row[colIdx]) || defaultValue;
72
+ }
73
+
74
+ layerEnter(map: Map) {
75
+ map.addLayer(this._layer);
76
+ const elem = d3Select(map.getContainer()).select(".leaflet-pane.leaflet-marker-pane");
77
+ this._selection.widgetElement(elem);
78
+ }
79
+
80
+ layerUpdate(map: Map) {
81
+ }
82
+
83
+ layerExit(map: Map) {
84
+ this._layer.clearLayers();
85
+ map.removeLayer(this._layer);
86
+ }
87
+
88
+ // Events ---
89
+ zoomEnd(e: LeafletEvent) {
90
+ }
91
+
92
+ moveEnd(e: LeafletEvent) {
93
+ }
94
+
95
+ viewReset(e: LeafletEvent) {
96
+ }
97
+
98
+ }
99
+ FeatureLayer.prototype._class += " map_FeatureLayer";
100
+ FeatureLayer.prototype.mixin(Utility.SimpleSelectionMixin);
101
+ FeatureLayer.prototype.publishReset(["layers"]);
102
+
103
+ // ---------------------------------------------------------------------------
104
+ export class ClusterLayer extends FeatureLayer {
105
+
106
+ constructor(cluster = true) {
107
+ super(cluster);
108
+ }
109
+ }
110
+ ClusterLayer.prototype._class += " map_ClusterLayer";
111
+
112
+ // ---------------------------------------------------------------------------
113
+ export class D3SurfaceLayer extends FeatureLayer {
114
+
115
+ protected _lfd3 = new D3SvgOverlay()
116
+ .drawCallback((selection, projection) => this.layerUpdate(undefined, projection));
117
+
118
+ hasBounds(): boolean {
119
+ return true;
120
+ }
121
+
122
+ getBounds() {
123
+ return this._lfd3.getBounds();
124
+ }
125
+
126
+ layerEnter(map: Map) {
127
+ super.layerEnter(map);
128
+ this.add(this._lfd3);
129
+ }
130
+
131
+ layerUpdate(map: Map, projection?) {
132
+ super.layerUpdate(map);
133
+ }
134
+
135
+ // Events ---
136
+ clickHandler(e, row) {
137
+ }
138
+ }
@@ -1,44 +1,44 @@
1
- import * as _GoogleMapsLoader from "google-maps";
2
-
3
- import { GoogleMutant, Map } from "./leaflet-shim.ts";
4
- import { requireGoogleMap } from "../GMap.ts";
5
- import { TileLayer } from "./TileLayer.ts";
6
-
7
- declare const window: any;
8
-
9
- export class GMapLayer extends TileLayer {
10
-
11
- constructor() {
12
- super();
13
- }
14
-
15
- init(): Promise<void> {
16
- if (!this._initPromise) {
17
- this._initPromise = requireGoogleMap();
18
- }
19
- return this._initPromise;
20
- }
21
-
22
- attribution(): string {
23
- return !window.__hpcc_gmap_apikey ? "DEVELOPER USE ONLY (@hpcc-js)" : "";
24
- }
25
-
26
- getMaxZoom(): number {
27
- return 23;
28
- }
29
-
30
- layerEnter(map: Map) {
31
- super.layerEnter(map);
32
- this.add(new GoogleMutant({
33
- type: "roadmap",
34
- styles: this.googleMapStyles()
35
- }));
36
- }
37
- }
38
- GMapLayer.prototype._class += " map_GMapLayer";
39
- export interface GMapLayer {
40
- googleMapStyles(): object;
41
- googleMapStyles(_: object): this;
42
- }
43
-
44
- GMapLayer.prototype.publish("googleMapStyles", {}, "object", "Styling for map colors etc", null, { tags: ["Basic"] });
1
+ import * as _GoogleMapsLoader from "google-maps";
2
+
3
+ import { GoogleMutant, Map } from "./leaflet-shim.ts";
4
+ import { requireGoogleMap } from "../GMap.ts";
5
+ import { TileLayer } from "./TileLayer.ts";
6
+
7
+ declare const window: any;
8
+
9
+ export class GMapLayer extends TileLayer {
10
+
11
+ constructor() {
12
+ super();
13
+ }
14
+
15
+ init(): Promise<void> {
16
+ if (!this._initPromise) {
17
+ this._initPromise = requireGoogleMap();
18
+ }
19
+ return this._initPromise;
20
+ }
21
+
22
+ attribution(): string {
23
+ return !window.__hpcc_gmap_apikey ? "DEVELOPER USE ONLY (@hpcc-js)" : "";
24
+ }
25
+
26
+ getMaxZoom(): number {
27
+ return 23;
28
+ }
29
+
30
+ layerEnter(map: Map) {
31
+ super.layerEnter(map);
32
+ this.add(new GoogleMutant({
33
+ type: "roadmap",
34
+ styles: this.googleMapStyles()
35
+ }));
36
+ }
37
+ }
38
+ GMapLayer.prototype._class += " map_GMapLayer";
39
+ export interface GMapLayer {
40
+ googleMapStyles(): object;
41
+ googleMapStyles(_: object): this;
42
+ }
43
+
44
+ GMapLayer.prototype.publish("googleMapStyles", {}, "object", "Styling for map colors etc", null, { tags: ["Basic"] });
@@ -1,77 +1,77 @@
1
- import { LHeatLayer, LatLngBounds, Map } from "./leaflet-shim.ts";
2
- import { FeatureLayer } from "./FeatureLayer.ts";
3
-
4
- export class HeatLayer extends FeatureLayer {
5
-
6
- hasBounds(): boolean {
7
- return true;
8
- }
9
-
10
- layerUpdate(map: Map) {
11
- super.layerUpdate(map);
12
- this.style("opacity", this.opacity());
13
- const columns = this.columns();
14
- const latIdx = this.latitudeColumn_exists() ? columns.indexOf(this.latitudeColumn()) : 0;
15
- const longIdx = this.longitudeColumn_exists() ? columns.indexOf(this.longitudeColumn()) : 1;
16
- const weightIdx = columns.indexOf(this.weightColumn());
17
- this.clear();
18
- let bounds: LatLngBounds;
19
- const data = this.data().filter(row => !this.omitNullLatLong() || (!!row[latIdx] && !!row[longIdx])).map(row => {
20
- if (!bounds) {
21
- bounds = new LatLngBounds([row[latIdx], row[longIdx]]);
22
- } else {
23
- bounds.extend([row[latIdx], row[longIdx]]);
24
- }
25
- return [row[latIdx], row[longIdx], this.weightColumn_exists() ? row[weightIdx] : 0.5];
26
- });
27
- const heat = new LHeatLayer(data, {
28
- minOpacity: this.minOpacity(),
29
- max: this.max(),
30
- radius: this.radius(),
31
- blur: this.blur(),
32
- gradient: this.gradient() as any
33
- });
34
- (heat as any).getBounds = () => {
35
- return bounds;
36
- };
37
- this.add(heat);
38
- }
39
- }
40
- HeatLayer.prototype._class += " map_Heat";
41
-
42
- export interface HeatLayer {
43
- latitudeColumn(): string;
44
- latitudeColumn(_: string);
45
- latitudeColumn_exists(): boolean;
46
- longitudeColumn(): string;
47
- longitudeColumn(_: string);
48
- longitudeColumn_exists(): boolean;
49
- weightColumn(): string;
50
- weightColumn(_: string);
51
- weightColumn_exists(): boolean;
52
- omitNullLatLong(): boolean;
53
- omitNullLatLong(_: boolean);
54
- opacity(): number;
55
- opacity(_: number);
56
- minOpacity(): number;
57
- minOpacity(_: number);
58
- max(): number;
59
- max(_: number);
60
- radius(): number;
61
- radius(_: number);
62
- blur(): number;
63
- blur(_: number);
64
- gradient(): object;
65
- gradient(_: object);
66
- }
67
-
68
- HeatLayer.prototype.publish("latitudeColumn", null, "set", "Latitude column", function () { return this.columns(); }, { optional: true });
69
- HeatLayer.prototype.publish("longitudeColumn", null, "set", "Longitude column", function () { return this.columns(); }, { optional: true });
70
- HeatLayer.prototype.publish("weightColumn", null, "set", "Optional normalized intensity (0 -> 1) ", function () { return this.columns(); }, { optional: true });
71
- HeatLayer.prototype.publish("omitNullLatLong", true, "boolean", "Remove lat=0,lng=0 from IconsData", null, { tags: ["Basic"] });
72
- HeatLayer.prototype.publish("opacity", 0.5, "number", "Layer Opacity");
73
- HeatLayer.prototype.publish("minOpacity", 0.5, "number", "The minimum opacity the heat will start at", null, { tags: ["Basic"] });
74
- HeatLayer.prototype.publish("max", 1, "number", "maximum point intensity, 1.0 by default", null, { tags: ["Basic"] });
75
- HeatLayer.prototype.publish("radius", 25, "number", "radius of each point of the heatmap, 25 by default", null, { tags: ["Basic"] });
76
- HeatLayer.prototype.publish("blur", 15, "number", "amount of blur, 15 by default", null, { tags: ["Basic"] });
77
- HeatLayer.prototype.publish("gradient", null, "object", "color gradient config", null, { tags: ["Basic"], optional: true });
1
+ import { LHeatLayer, LatLngBounds, Map } from "./leaflet-shim.ts";
2
+ import { FeatureLayer } from "./FeatureLayer.ts";
3
+
4
+ export class HeatLayer extends FeatureLayer {
5
+
6
+ hasBounds(): boolean {
7
+ return true;
8
+ }
9
+
10
+ layerUpdate(map: Map) {
11
+ super.layerUpdate(map);
12
+ this.style("opacity", this.opacity());
13
+ const columns = this.columns();
14
+ const latIdx = this.latitudeColumn_exists() ? columns.indexOf(this.latitudeColumn()) : 0;
15
+ const longIdx = this.longitudeColumn_exists() ? columns.indexOf(this.longitudeColumn()) : 1;
16
+ const weightIdx = columns.indexOf(this.weightColumn());
17
+ this.clear();
18
+ let bounds: LatLngBounds;
19
+ const data = this.data().filter(row => !this.omitNullLatLong() || (!!row[latIdx] && !!row[longIdx])).map(row => {
20
+ if (!bounds) {
21
+ bounds = new LatLngBounds([row[latIdx], row[longIdx]]);
22
+ } else {
23
+ bounds.extend([row[latIdx], row[longIdx]]);
24
+ }
25
+ return [row[latIdx], row[longIdx], this.weightColumn_exists() ? row[weightIdx] : 0.5];
26
+ });
27
+ const heat = new LHeatLayer(data, {
28
+ minOpacity: this.minOpacity(),
29
+ max: this.max(),
30
+ radius: this.radius(),
31
+ blur: this.blur(),
32
+ gradient: this.gradient() as any
33
+ });
34
+ (heat as any).getBounds = () => {
35
+ return bounds;
36
+ };
37
+ this.add(heat);
38
+ }
39
+ }
40
+ HeatLayer.prototype._class += " map_Heat";
41
+
42
+ export interface HeatLayer {
43
+ latitudeColumn(): string;
44
+ latitudeColumn(_: string);
45
+ latitudeColumn_exists(): boolean;
46
+ longitudeColumn(): string;
47
+ longitudeColumn(_: string);
48
+ longitudeColumn_exists(): boolean;
49
+ weightColumn(): string;
50
+ weightColumn(_: string);
51
+ weightColumn_exists(): boolean;
52
+ omitNullLatLong(): boolean;
53
+ omitNullLatLong(_: boolean);
54
+ opacity(): number;
55
+ opacity(_: number);
56
+ minOpacity(): number;
57
+ minOpacity(_: number);
58
+ max(): number;
59
+ max(_: number);
60
+ radius(): number;
61
+ radius(_: number);
62
+ blur(): number;
63
+ blur(_: number);
64
+ gradient(): object;
65
+ gradient(_: object);
66
+ }
67
+
68
+ HeatLayer.prototype.publish("latitudeColumn", null, "set", "Latitude column", function () { return this.columns(); }, { optional: true });
69
+ HeatLayer.prototype.publish("longitudeColumn", null, "set", "Longitude column", function () { return this.columns(); }, { optional: true });
70
+ HeatLayer.prototype.publish("weightColumn", null, "set", "Optional normalized intensity (0 -> 1) ", function () { return this.columns(); }, { optional: true });
71
+ HeatLayer.prototype.publish("omitNullLatLong", true, "boolean", "Remove lat=0,lng=0 from IconsData", null, { tags: ["Basic"] });
72
+ HeatLayer.prototype.publish("opacity", 0.5, "number", "Layer Opacity");
73
+ HeatLayer.prototype.publish("minOpacity", 0.5, "number", "The minimum opacity the heat will start at", null, { tags: ["Basic"] });
74
+ HeatLayer.prototype.publish("max", 1, "number", "maximum point intensity, 1.0 by default", null, { tags: ["Basic"] });
75
+ HeatLayer.prototype.publish("radius", 25, "number", "radius of each point of the heatmap, 25 by default", null, { tags: ["Basic"] });
76
+ HeatLayer.prototype.publish("blur", 15, "number", "amount of blur, 15 by default", null, { tags: ["Basic"] });
77
+ HeatLayer.prototype.publish("gradient", null, "object", "color gradient config", null, { tags: ["Basic"], optional: true });
@@ -1,60 +1,60 @@
1
- import { Icon, Map } from "./leaflet-shim.ts";
2
- import { Markers } from "./Markers.ts";
3
-
4
- export class Icons extends Markers {
5
-
6
- constructor(cluster = false) {
7
- super(cluster);
8
- }
9
-
10
- layerUpdate(map: Map) {
11
- const columns = this.columns();
12
- const iconUrlIdx = columns.indexOf(this.iconUrlColumn());
13
- super.layerUpdate(map, (row) => {
14
- return {
15
- icon: new Icon({
16
- iconUrl: this.propValue(iconUrlIdx, row, this.iconUrl()),
17
- iconSize: [this.iconWidth(), this.iconHeight()],
18
- iconAnchor: [this.iconAnchorX(), this.iconAnchorY()],
19
- props: {
20
- owner: this,
21
- row
22
- }
23
- }),
24
- draggable: false
25
- };
26
- });
27
- }
28
- }
29
- Icons.prototype._class += " map_Icons";
30
-
31
- export interface Icons {
32
- iconUrl(): string;
33
- iconUrl(_: string);
34
- iconUrl_exists(): boolean;
35
- iconUrlColumn(): string;
36
- iconUrlColumn(_: string);
37
- iconUrlColumn_exists(): boolean;
38
- iconWidth(): number;
39
- iconWidth(_: number);
40
- iconHeight(): number;
41
- iconHeight(_: number);
42
- iconAnchorX(): number;
43
- iconAnchorX(_: number);
44
- iconAnchorY(): number;
45
- iconAnchorY(_: number);
46
- }
47
-
48
- Icons.prototype.publish("iconUrl", "", "string", "Icon URL", null);
49
- Icons.prototype.publish("iconUrlColumn", null, "set", "Icon URL column", function () { return this.columns(); }, { optional: true });
50
- Icons.prototype.publish("iconWidth", 32, "number", "Icon width");
51
- Icons.prototype.publish("iconHeight", 32, "number", "Icon height");
52
- Icons.prototype.publish("iconAnchorX", 16, "number", "Icon Anchor X");
53
- Icons.prototype.publish("iconAnchorY", 32, "number", "Icon Anchor Y");
54
-
55
- export class ClusterIcons extends Icons {
56
- constructor() {
57
- super(true);
58
- }
59
- }
60
- ClusterIcons.prototype._class += " map_ClusterIcons";
1
+ import { Icon, Map } from "./leaflet-shim.ts";
2
+ import { Markers } from "./Markers.ts";
3
+
4
+ export class Icons extends Markers {
5
+
6
+ constructor(cluster = false) {
7
+ super(cluster);
8
+ }
9
+
10
+ layerUpdate(map: Map) {
11
+ const columns = this.columns();
12
+ const iconUrlIdx = columns.indexOf(this.iconUrlColumn());
13
+ super.layerUpdate(map, (row) => {
14
+ return {
15
+ icon: new Icon({
16
+ iconUrl: this.propValue(iconUrlIdx, row, this.iconUrl()),
17
+ iconSize: [this.iconWidth(), this.iconHeight()],
18
+ iconAnchor: [this.iconAnchorX(), this.iconAnchorY()],
19
+ props: {
20
+ owner: this,
21
+ row
22
+ }
23
+ }),
24
+ draggable: false
25
+ };
26
+ });
27
+ }
28
+ }
29
+ Icons.prototype._class += " map_Icons";
30
+
31
+ export interface Icons {
32
+ iconUrl(): string;
33
+ iconUrl(_: string);
34
+ iconUrl_exists(): boolean;
35
+ iconUrlColumn(): string;
36
+ iconUrlColumn(_: string);
37
+ iconUrlColumn_exists(): boolean;
38
+ iconWidth(): number;
39
+ iconWidth(_: number);
40
+ iconHeight(): number;
41
+ iconHeight(_: number);
42
+ iconAnchorX(): number;
43
+ iconAnchorX(_: number);
44
+ iconAnchorY(): number;
45
+ iconAnchorY(_: number);
46
+ }
47
+
48
+ Icons.prototype.publish("iconUrl", "", "string", "Icon URL", null);
49
+ Icons.prototype.publish("iconUrlColumn", null, "set", "Icon URL column", function () { return this.columns(); }, { optional: true });
50
+ Icons.prototype.publish("iconWidth", 32, "number", "Icon width");
51
+ Icons.prototype.publish("iconHeight", 32, "number", "Icon height");
52
+ Icons.prototype.publish("iconAnchorX", 16, "number", "Icon Anchor X");
53
+ Icons.prototype.publish("iconAnchorY", 32, "number", "Icon Anchor Y");
54
+
55
+ export class ClusterIcons extends Icons {
56
+ constructor() {
57
+ super(true);
58
+ }
59
+ }
60
+ ClusterIcons.prototype._class += " map_ClusterIcons";
@@ -1,4 +1,4 @@
1
- .map_Leaflet .leaflet-container {
2
- background-color:rgba(255,0,0,0.0);
3
- background: rgba(255,0,0,0.0);
1
+ .map_Leaflet .leaflet-container {
2
+ background-color:rgba(255,0,0,0.0);
3
+ background: rgba(255,0,0,0.0);
4
4
  }