Tarwin Stroh-Spijer
Tarwin Stroh-Spijer

Reputation: 353

Adding TileJSON layer hangs browser

Adding my custom TileJSON causes the browser to hang.

Custom TileJSON: https://data.madronus.com/landcraft/assessment-data/dNfg1lNQF1Zaz-0VpTYxq/20/tms/tilejson.json

Adding the source like this:

map.addSource(`tiles-source`, {
  type: 'raster',
  url: <URL>,
})

And the layer like this:

this.map.addLayer({
  id: 'tiles',
  type: 'raster',
  source: 'tiles-source',
})

Upvotes: 1

Views: 143

Answers (1)

Tarwin Stroh-Spijer
Tarwin Stroh-Spijer

Reputation: 353

It turns out that MapboxGL (JS) will crash if any of your Lng/Lats are set as strings rather than floats. Updating the TileJSON to floats for center and bounds fixes this.

Upvotes: 0

Related Questions