question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support TMS indexing in TileLayer

See original GitHub issue

I’m using MVT Layer in deckgl with GeoServer and when the MVT layer is trying to fetch the data from the url the inverted y axis i.e. -y goes undefined.

new deck.DeckGL({
                initialViewState: {
                    longitude: -79.3832,
                    latitude: 43.6532,
                    zoom: 14
                },
                controller: true,
                layers: [
                    new deck.MVTLayer({
                        data: "/geoserver/gwc/service/tms/1.0.0/"+layer+"@EPSG%3A"+projection_epsg_no+"@pbf/{z}/{x}/{-y}.pbf",
                    })
                ]
            })

For the above code MVT layer is considering -y as undefined as below.

/geoserver/gwc/service/tms/1.0.0/ibi:SWwidths_v1@EPSG%3A900913@pbf/14/4579/undefined.pbf.

I even tried using open layers with the same URL and it was considering -y properly.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
kylebarroncommented, Jul 8, 2020

The difference between XYZ and TMS indexing is a flipped y coordinate, see: https://gist.github.com/tmcw/4954720.

To support this we could have a tms prop on the TileLayer, and internally call y = Math.pow(2, z) - y - 1; when the flag is true.

0reactions
Pessimistresscommented, Oct 12, 2020

This is now available in 8.3.0-beta

Read more comments on GitHub >

github_iconTop Results From Across the Web

TMS with TileLayer? · Discussion #5607 · visgl/deck.gl - GitHub
I am trying to use the TileLayer with a TMS (MapProxy) service. With the TileLayer by default supporting slippy map tilenames/( zxy )...
Read more >
Change pane of existing tileLayer in Leaflet interactively
So you can set a unique pane for each of your tilelayers, and change their z-indexes when you need to change their order....
Read more >
Custom Canvas Tiles - OpenLayers
The displayed TMS tile coordinates are produced using a custom template for TMS, the vector tile source's 512 pixel tile grid and the...
Read more >
What's New - deck.gl
Starting from v8.8, the TileLayer supports custom indexing systems. Applications can now supply a custom implementation of Tileset2D to the TilesetClass prop.
Read more >
deck.gl v8.8 - Yarn
Use deck.gl layers as custom mapbox layers, enabling seamless interleaving of mapbox and deck.gl layers. See deck.gl for documentation.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found