diff --git a/div-icon.js b/div-icon.js index 7336326..e5ace5b 100644 --- a/div-icon.js +++ b/div-icon.js @@ -28,6 +28,8 @@ export default class Divicon extends MapLayer { zIndexOffset: PropTypes.number, }; + static contextTypes = MapLayer.contextTypes; + static childContextTypes = { popupContainer: PropTypes.object, }; diff --git a/index.js b/index.js index e10ae08..6f2d430 100644 --- a/index.js +++ b/index.js @@ -167,6 +167,7 @@ Divicon.propTypes = { opacity: _propTypes2.default.number, zIndexOffset: _propTypes2.default.number }; +Divicon.contextTypes = _reactLeaflet.MapLayer.contextTypes; Divicon.childContextTypes = { popupContainer: _propTypes2.default.object };