Comments (4)
I'm having the same problem, but I don't think the it's related to React specifically. It seems Leaflet.VectorGrid.bundled.js
does not play well with JS bundlers (Webpack/Browserify). VectorGrid expects Pbf
to be defined in the global scope, but if the bundle is referenced with 'import' and bundled with Webpack, the global Pbf
object will not be available.
from leaflet.vectorgrid.
from leaflet.vectorgrid.
I've a similar problem with my local package where I add inside onUse function:
api.addFiles([ '.npm/package/node_modules/leaflet.vectorgrid/dist/Leaflet.VectorGrid.bundled.js' ], 'client');
(so is not an "import" reference)
and in browser console i get the following:
Uncaught ReferenceError: Pbf is not defined
I'm not using webpack: I'm playing with meteorkitchen.com generator so I need to find alternative solutions
from leaflet.vectorgrid.
I found solution
from leaflet.vectorgrid.
Related Issues (20)
- Uncaught Error: Unimplemented type: 3 HOT 2
- protobuf vectorgrid is not handling Long Integers why? HOT 4
- Build failed HOT 1
- Toggle polygon HOT 1
- I cant display points. I can't change the style points/polygons. HOT 1
- Define bounds or extent of VectorGrid layer HOT 2
- Demo pages with points don't work HOT 1
- Layer order inside a tile
- Some tiles not rendering HOT 2
- Uncaught TypeError: Cannot read properties of undefined (reading 'lat') HOT 4
- support L.divIcon
- Protobuf - Get clicked feature (or its geometry)
- Problem with Leaflet >= 1.8 HOT 3
- remove added layer from map HOT 2
- Project status / Alternative Fork?
- Nothing rendering with `_getVectorTilePromise` custom implementation HOT 3
- fillOpacity and fillColor have no effect when rendering circlemarkers HOT 1
- Styling points/circles differently from Polygons
- How can I use maxNativeZoom to continue to show the vector tiles beyond their maximum zoom level?
- While using vectorGrid.protobuf for displaying vector tiles on map i was not able to capture mouse events initially until when i zoomed out to minzoom level
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leaflet.vectorgrid.