var L = require('leaflet') is not defined
Closed this issue · 7 comments
Are you using browserify/webpack or just a <script>
tag? If the latter, make sure you're pointing to the version inside dist/
not src/
.
Did you try changing it to point to the dist/
file instead of the src/
file like I suggested?
OK, I was able to deactivate Cross-Origin under developer tool in Safari, I see what I can do in Chrome...
It looks like you're trying to load your webpage as a file rather than via a local web server. The problem you're experiencing would happen with any module, and is not specific to leaflet-choropleth. I recommend you run a local web server on your computer for your development. The three.js docs have a good write-up about how to run things locally. Three.js has nothing to do with leaflet, but the problem you're describing is one faced by every web developer when they're getting started, so they cover it in their docs too. Hope that helps.