Skip to content

Commit 245267e

Browse files
committed
version 0.0.2
1 parent 87abca4 commit 245267e

File tree

6 files changed

+15
-7
lines changed

6 files changed

+15
-7
lines changed

dist/leaflet-ui-src.js

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/leaflet-ui-src.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/leaflet-ui.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/leaflet-ui.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "leaflet-ui",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"description": "Leaflet maps bundle for common user interface customizations",
55
"main": "dist/leaflet-ui.js",
66
"module": "src/leaflet-ui.js",

src/leaflet-ui.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import 'google-maps'; // async
1+
import * as gapi from 'google-maps'; // async
22

33
import 'leaflet.gridlayer.googlemutant';
44
import 'leaflet.locatecontrol';
@@ -9,6 +9,8 @@ import 'leaflet-control-layers-inline';
99

1010
// import './leaflet-ui.css';
1111

12+
var G = Object.keys(gapi).length ? gapi : GoogleMapsLoader;
13+
1214
(function() {
1315

1416
L.Map.mergeOptions({
@@ -30,7 +32,7 @@ import 'leaflet-control-layers-inline';
3032
} else {
3133
this.zoomControl.remove();
3234
this.attributionControl.remove();
33-
if (!window.google && isGMap.call(this)) (GoogleMapsLoader).load(initMap.bind(this));
35+
if (!window.google && isGMap.call(this)) G.load(initMap.bind(this));
3436
else initMap.call(this);
3537
}
3638
});

0 commit comments

Comments
 (0)