Possible breaking change in 0.7.1 .addTo()?
Hi, we saw an error in some pretty old code, and realized we'd (oops!) direct linked this lib using:
<script src='//unpkg.com/leaflet.gridlayer.googlemutant@latest/Leaflet.GoogleMutant.js'></script>
Which had pointed at 0.7.0 and worked fine until 0.7.1's release 2 weeks ago. This oddly resulted in the error at bottom, where we'd been instantiating the layer with:
var googleMutant = L.gridLayer.googleMutant({
type: 'satellite', // valid values are 'roadmap', 'satellite', 'terrain' and 'hybrid'
maxZoom: 24,
maxNativeZoom: 20,
opacity:0.5
}).addTo(this._map);
The error is here; just to note this may very well have been a mistake on our end but just in case it's an unexpected behavior on yours, we wanted to report it. Thanks for this excellent library!
application-814f0f7d1f14959e89d403289c841d04.js:formatted:5910 Uncaught TypeError: Cannot read property 'trim' of undefined
at Object.trim (application-814f0f7d1f14959e89d403289c841d04.js:formatted:5910)
at Object.splitWords (application-814f0f7d1f14959e89d403289c841d04.js:formatted:5913)
at Object.off (application-814f0f7d1f14959e89d403289c841d04.js:formatted:7690)
at e._initMutantContainer (VM363 Leaflet.GoogleMutant.js:151)
at e.onAdd (VM363 Leaflet.GoogleMutant.js:56)
at e._layerAdd (application-814f0f7d1f14959e89d403289c841d04.js:formatted:7604)
at e.whenReady (application-814f0f7d1f14959e89d403289c841d04.js:formatted:7422)
at e.addLayer (application-814f0f7d1f14959e89d403289c841d04.js:formatted:7619)
at e.addTo (application-814f0f7d1f14959e89d403289c841d04.js:formatted:7568)
at e.setupMap (maps-12eb24525a5d253239b52f94754d6f42.js:13)
trim @ application-814f0f7d1f14959e89d403289c841d04.js:formatted:5910
splitWords @ application-814f0f7d1f14959e89d403289c841d04.js:formatted:5913
off @ application-814f0f7d1f14959e89d403289c841d04.js:formatted:7690
_initMutantContainer @ VM363 Leaflet.GoogleMutant.js:151
onAdd @ VM363 Leaflet.GoogleMutant.js:56
_layerAdd @ application-814f0f7d1f14959e89d403289c841d04.js:formatted:7604
whenReady @ application-814f0f7d1f14959e89d403289c841d04.js:formatted:7422
addLayer @ application-814f0f7d1f14959e89d403289c841d04.js:formatted:7619
addTo @ application-814f0f7d1f14959e89d403289c841d04.js:formatted:7568
setupMap @ maps-12eb24525a5d253239b52f94754d6f42.js:13
initialize @ maps-12eb24525a5d253239b52f94754d6f42.js:13
e @ maps-12eb24525a5d253239b52f94754d6f42.js:13
(anonymous) @ beer:851
(anonymous) @ beer:859
beer:298 Uncaught TypeError: Cannot read property 'getMap' of undefined
at HTMLDocument.<anonymous> (beer:298)
at h (application-814f0f7d1f14959e89d403289c841d04.js:formatted:1957)
at Object.fireWith [as resolveWith] (application-814f0f7d1f14959e89d403289c841d04.js:formatted:2009)
at Function.ready (application-814f0f7d1f14959e89d403289c841d04.js:formatted:2103)
at HTMLDocument.a (application-814f0f7d1f14959e89d403289c841d04.js:formatted:155)