Comments (6)
I fixed by doing:
if (!data || Object.keys(data).length === 0) {
return { latlng: e.latlng, data: null };
}
Is this a good fix? Should I submit a patch?
from leaflet.utfgrid.
Sounds like it could be on the right track, would it be possible to upload an example?
I'm interested in seeing how you have this set up so you get an empty data object.
from leaflet.utfgrid.
I am just playing around with the plugin and had a problem at the same line. I have created my maps and exported .mbtiles-files with TileMill, and there I made the bounds small than a whole map. So this is why I got errors afterwards in the browser. The suggested code has stopped those errors for me.
from leaflet.utfgrid.
Ditto. Indeed, webdobe's code fixes all. Thanks webdobe.
from leaflet.utfgrid.
Can anyone please upload an example that causes the error so I can confirm and add the fix? thanks!
from leaflet.utfgrid.
Awesome, thanks.
Have pushed a new version with a fix, please test it out! :)
from leaflet.utfgrid.
Related Issues (20)
- Support touch devices HOT 1
- Support templates and custom templates
- Between-zoom support HOT 1
- Max Zoom 18? HOT 3
- setUrl method HOT 2
- get pixel coordinates for mouse events HOT 1
- Prevent to trigger click event on double-click HOT 1
- Multiple Grid Layers HOT 4
- Precision
- utfgrid example mb-util HOT 3
- Mouseout only when leaving layer area HOT 4
- initialize function issue HOT 5
- sparse tile sets don't work
- Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node' HOT 5
- Internet Explorer - DOMException Invalid State HOT 2
- UTFGrid is not working when zoom level is non-integer (Leaflet 1.0) HOT 3
- Definition File HOT 2
- Layer is not added after zooming into min/max zoom range
- external service url
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.utfgrid.