Skip to content

Instantly share code, notes, and snippets.

@stefangordon
Last active June 8, 2016 16:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
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