Skip to content

Instantly share code, notes, and snippets.

@stefangordon
Last active June 8, 2016 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefangordon/73c4490b2128d395feb539f883c0cf60 to your computer and use it in GitHub Desktop.
Save stefangordon/73c4490b2128d395feb539f883c0cf60 to your computer and use it in GitHub Desktop.
'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