Demo does not work: TypeError: Cannot read property 'length' of undefined
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 380
- Forks
- 140
- PR merge metrics
- No merged PRs in 30d
Description
Just opening the [demo](http://mapbox.github.io/leaflet-image/) and clicking 'Take a snapshot' will give the error below. Adding a L.Tilelayer doesn't help.
```
leaflet-image.js:58 Uncaught TypeError: Cannot read property 'length' of undefined
L.TileLayer.extend.getTileUrl @ tile_layer.js:73
(anonymous function) @ leaflet-image.js:118
handleTileLayer @ leaflet-image.js:102
start @ leaflet-image.js:307
poke @ leaflet-image.js:295
queue.defer @ leaflet-image.js:273
drawTileLayer @ leaflet-image.js:43
o.Map.o.Class.extend.eachLayer @ leaflet-src.js:1727
leafletImage @ leaflet-image.js:32
(anonymous function) @ (index):43
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure by opening the demo and clicking “Take a snapshot,” then trace the stack from leaflet-image.js:43, 102, 118, and 307 into tile_layer.js:73. Check why getTileUrl receives an undefined value, including when an L.TileLayer is added. Done means the demo completes a snapshot without the TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100