Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
'use strict';
import { PropTypes } from 'react';
import { BaseTileLayer } from 'react-leaflet';
require('leaflet-plugins/layer/tile/Bing.js');
export default class BingTileLayer extends BaseTileLayer {
static propTypes = {
bingKey: PropTypes.string.isRequired,
type: PropTypes.string.isRequired
};
componentWillMount() {
super.componentWillMount();
this.leafletElement = new L.BingLayer(this.props.bingKey, {type: this.props.type});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment