React-leaflet: BaseLayer -- Uncaught TypeError: addBaseLayer is not a function

Created on 9 Aug 2017  路  5Comments  路  Source: PaulLeCam/react-leaflet

Please make sure to check the following boxes before submitting an issue. Thanks!

  • [x] All peer dependencies are installed: React, ReactDOM and Leaflet.
  • [x] Using a supported version of React and ReactDOM (v15.x).
  • [x] Using the supported version of Leaflet (v1.1.x) and its corresponding CSS file is loaded.
  • [x] Using the latest stable version of React-Leaflet.
  • [x] The issue has not already been reported.
  • [x] Make sure you have followed the quick start guide for Leaflet.
  • [x] Make sure you have fully read the documentation and that you understand the technical considerations.

Expected behavior

BaseLayer is added to LayerControl on Leaflet map in React

Actual behavior

Map is blank and error in console: Uncaught TypeError: addBaseLayer is not a function

Steps to reproduce

Please provide the simplest example possible to reproduce the issue, based on this WebpackBin.

https://www.webpackbin.com/bins/-KrGeo-xgj73pzuZdDBU

All 5 comments

There is no Map rendered in your example, please use the reference WebpackBin to reproduce your issue.

Sorry about that. I have updated my comment.
https://www.webpackbin.com/bins/-KrBZ-3qiOr0SMun_B-K

You example is still breaking, whatever problem you're having doesn't seem related to this lib.

I'll try one more time: https://www.webpackbin.com/bins/-KrGeo-xgj73pzuZdDBU

I really want to get this example to work. Even if it is an issue on my end I would appreciate a pointer. Would love to use this lib.

Nevermind, found my issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benzen picture benzen  路  4Comments

fborghi picture fborghi  路  3Comments

rolfdalhaug picture rolfdalhaug  路  3Comments

treydavis picture treydavis  路  4Comments

thenickcox picture thenickcox  路  4Comments