This commit is contained in:
Sebastiaan van Achterbergh committed 2018-06-15 14:15:05 +02:00
1 parent b1abb0da66
commit e250fba1c1
2 files changed
+7 -2

No files matched your search

+3 -2
View File
@@ -8,7 +8,8 @@ export default class GoogleLayer extends GridLayer {
static propTypes = {
googlekey: PropTypes.string.isRequired,
maptype: PropTypes.string,
asclientid: PropTypes.bool
asclientid: PropTypes.bool,
channel: PropTypes.string
};
@@ -20,7 +21,7 @@ export default class GoogleLayer extends GridLayer {
componentWillMount() {
super.componentWillMount();
const {map: _map, googlekey, maptype, asclientid, ...props} = this.props;
const {map: _map, googlekey, maptype, asclientid, channel, ...props} = this.props;
this.leafletElement = new L.gridLayer.googleMutant(this.props);
}
+4
View File
@@ -37,6 +37,10 @@ L.GridLayer.GoogleMutant = L.GridLayer.extend({
GoogleMapsLoader.LIBRARIES = options.libraries || [];
if (options.channel) {
GoogleMapsLoader.CHANNEL = options.channel;
}
self._type = options.maptype || 'SATELLITE';
GoogleMapsLoader.load(function (_google) {