From a265479dd8e884aa10f2a726dd044083b8d67d27 Mon Sep 17 00:00:00 2001 From: Gianmarco Date: Mon, 27 May 2019 12:42:03 +0200 Subject: [PATCH] Update leaflet.google.js Add possibility to pass map version as option. --- src/leaflet.google.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/leaflet.google.js b/src/leaflet.google.js index 6505971..d91ed8e 100644 --- a/src/leaflet.google.js +++ b/src/leaflet.google.js @@ -3,8 +3,6 @@ import GoogleMapsLoader from "google-maps"; import * as L from "leaflet"; -GoogleMapsLoader.VERSION = "3.32"; - let google; // class GridLayer.GoogleMutant @@ -29,9 +27,12 @@ L.GridLayer.GoogleMutant = L.GridLayer.extend({ }, initialize(options) { + L.GridLayer.prototype.initialize.call(this, options); let self = this; + GoogleMapsLoader.VERSION = options.version || "3.32"; + if ( options.asclientid ) { GoogleMapsLoader.CLIENT = options.googlekey; } else {