Last active
June 8, 2016 16:53
-
-
Save stefangordon/73c4490b2128d395feb539f883c0cf60 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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