@hpcc-js/map 3.5.8 → 3.5.9

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": "@hpcc-js/map",
3
- "version": "3.5.8",
3
+ "version": "3.5.9",
4
4
  "description": "hpcc-js - Viz Map",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.cjs",
@@ -41,15 +41,15 @@
41
41
  "update-major": "npx --yes npm-check-updates -u"
42
42
  },
43
43
  "dependencies": {
44
- "@hpcc-js/api": "^3.4.19",
45
- "@hpcc-js/common": "^3.7.9",
46
- "@hpcc-js/graph": "^3.7.8",
47
- "@hpcc-js/layout": "^3.5.14",
48
- "@hpcc-js/other": "^3.5.8",
49
- "@hpcc-js/util": "^3.5.8"
44
+ "@hpcc-js/api": "^3.4.20",
45
+ "@hpcc-js/common": "^3.7.10",
46
+ "@hpcc-js/graph": "^3.7.9",
47
+ "@hpcc-js/layout": "^3.5.15",
48
+ "@hpcc-js/other": "^3.5.9",
49
+ "@hpcc-js/util": "^3.5.9"
50
50
  },
51
51
  "devDependencies": {
52
- "@hpcc-js/esbuild-plugins": "^1.8.10",
52
+ "@hpcc-js/esbuild-plugins": "^1.8.11",
53
53
  "@types/leaflet-draw": "1.0.13",
54
54
  "@types/leaflet.heat": "0.2.5",
55
55
  "@types/leaflet.markercluster": "1.5.6",
@@ -61,7 +61,7 @@
61
61
  "d3-request": "^1",
62
62
  "d3-selection": "^1",
63
63
  "d3-tile": "^1",
64
- "google-maps": "3.3.0",
64
+ "google-maps": "4.3.3",
65
65
  "leaflet-draw": "1.0.4",
66
66
  "leaflet.heat": "0.2.0",
67
67
  "leaflet.markercluster": "1.5.3",
@@ -79,5 +79,5 @@
79
79
  "url": "https://github.com/hpcc-systems/Visualization/issues"
80
80
  },
81
81
  "homepage": "https://github.com/hpcc-systems/Visualization",
82
- "gitHead": "83d7d72530df75074464a3b746abfa800c62b555"
82
+ "gitHead": "1c0e8862859769465f70f384183f1399191d76e6"
83
83
  }
package/src/GMap.ts CHANGED
@@ -2,9 +2,7 @@ import { HTMLWidget } from "@hpcc-js/common";
2
2
  import { AbsoluteSurface } from "@hpcc-js/layout";
3
3
  import { promiseTimeout } from "@hpcc-js/util";
4
4
  import { map as d3Map } from "d3-collection";
5
- import * as _GoogleMapsLoader from "google-maps";
6
-
7
- const GoogleMapsLoader = _GoogleMapsLoader.default || _GoogleMapsLoader;
5
+ import { Loader } from "google-maps";
8
6
 
9
7
  import "../src/GMap.css";
10
8
 
@@ -31,11 +29,13 @@ export function requireGoogleMap(customGoogle?: any) {
31
29
  console.warn("__hpcc_gmap_apikey does not contain a valid API key, reverting to developers key (expect limited performance)");
32
30
  }
33
31
  try {
34
- GoogleMapsLoader.KEY = window.__hpcc_gmap_apikey || "AIzaSyDwGn2i1i_pMZvnqYJN1BksD_tjYaCOWKg";
35
- GoogleMapsLoader.LIBRARIES = ["geometry", "drawing"];
36
- GoogleMapsLoader.load(function (_google) {
32
+ const loader = new Loader(window.__hpcc_gmap_apikey || "AIzaSyDwGn2i1i_pMZvnqYJN1BksD_tjYaCOWKg", { libraries: ["geometry", "drawing"] });
33
+ loader.load().then(function (_google) {
37
34
  google = _google;
38
35
  resolve();
36
+ }).catch(function (e) {
37
+ console.warn(`Failed to initialize Google Map API: ${e.message}`);
38
+ resolve();
39
39
  });
40
40
  } catch (e) {
41
41
  console.warn(`Failed to initialize Google Map API: ${e.message}`);