plotly / plotly.js

Open-source JavaScript charting library behind Plotly and Dash
https://plotly.com/javascript/
MIT License
17.11k stars 1.87k forks source link

List valid geo projection types for given scope #2320

Closed VeraZab closed 5 months ago

VeraZab commented 6 years ago

https://codepen.io/veraz/pen/PQPaQM

For geo.scope = 'asia', the 'transverse mercator' and 'gnomonic' projections do not work.

Also, would you consider making the same projection types accessible across all scopes. Currently 'usa' only has 'albers usa' available. Could we maybe have that region accessible with more general projections instead of only this one?

When building the editor, we wouldn't want to have a special mapping to do on the editor side for scopes and accessible projections. It would be a lot simpler to have the same projections set accessible to all regions. Or is it possible to have such a mapping without having to explicitly write it out on the editor side of things?

etpinard commented 6 years ago

For geo.scope = 'asia', the 'transverse mercator' and 'gnomonic' projections do not work.

Ha. The scope region is probably unbounded using those projections. Thanks for bringing this up. There might be a way them work by restricting the projection range. But I'd put this in a low-priority bin. It's probably best to stick to the default projection for all scoped maps at this time.

Currently 'usa' only has 'albers usa' available

That's correct. That's what d3 allows us to do for now.

Also, would you consider making the same projection types accessible across all scopes.

We should do a better job at listing which projection types work correctly for a given scope, but making all projection types accessible is probably counter-productive. Some combinations plainly don't make any sense e.g. plotting the asia scope on an orthographic projection center around Europe.

gvwilson commented 5 months ago

Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson