react-leaflet#LeafletProvider JavaScript Examples
The following examples show how to use
react-leaflet#LeafletProvider.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LeafletDivMarker.js From dash-leaflet with MIT License | 6 votes |
render() {
const container = this.leafletElement._icon;
if (container) {
return ReactDOM.createPortal(<LeafletProvider value={this.contextValue}>
{this.props.children}
</LeafletProvider>, container)
}
else {
return null
}
}
Example #2
Source File: RotatedMarker.js From DMS_React with GNU Affero General Public License v3.0 | 5 votes |
render() {
const { children } = this.props;
return children == null || this.contextValue == null ? null : (
<LeafletProvider value={this.contextValue}>{children}</LeafletProvider>
);
}