plotly.js icon indicating copy to clipboard operation
plotly.js copied to clipboard

Enable "TMS" tile layer scheme as overlay in scattermapbox.

Open meteoDaniel opened this issue 6 years ago • 4 comments

There are two different ways of defining xyz tile layers for map visualisation. They are differing in the orientation of the naming of the y coordinate: The TMS specification orders from Bottom Left and the Google/OpenStreetmap (WMS, 'slippy') specification orders from Top Left. So the y naming is inverted.

Here you can find the required mapbox gl entry point: Vector->Scheme

This issue https://github.com/plotly/plotly.py/issues/1610 and this thread https://github.com/plotly/plotly.py/issues/2272 relates to this problem.

meteoDaniel avatar Mar 17 '20 14:03 meteoDaniel

Any updates on this issue?

meteoDaniel avatar Apr 09 '21 08:04 meteoDaniel

We'd be happy to integrate a PR for this but as far as I know no one is actively working on it :)

nicolaskruchten avatar Apr 09 '21 13:04 nicolaskruchten

Replacing the hardcoded "xyz" with "tms" in plotly-2.8.3.js allows using tms tiles just fine. There is this piece of code which handles the translation of the y coordinate: scheme === 'tms' ? Math.pow(2, this.z) - this.y - 1 : this.y.

The fix would be trivial, just allow users to specify "scheme" and pass it further where currently "xyz" is hardcoded.

aleb avatar Jul 13 '22 15:07 aleb

Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for several years, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Thanks for your help - @gvwilson

gvwilson avatar Jul 03 '24 17:07 gvwilson