Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
meteoDaniel opened this issue Mar 17, 2020 · 4 comments
Closed

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

meteoDaniel opened this issue Mar 17, 2020 · 4 comments

Comments

@meteoDaniel
Copy link

meteoDaniel commented Mar 17, 2020

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 plotly/plotly.py#1610 and this thread plotly/plotly.py#2272 relates to this problem.

@meteoDaniel meteoDaniel changed the title Enable "TMS" tile layer as overlay in scattermapbox. Enable "TMS" tile layer scheme as overlay in scattermapbox. Mar 17, 2020
@meteoDaniel
Copy link
Author

Any updates on this issue?

@nicolaskruchten
Copy link
Contributor

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

@aleb
Copy link

aleb commented Jul 13, 2022

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.

@gvwilson
Copy link
Contributor

gvwilson commented Jul 3, 2024

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 gvwilson closed this as completed Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants