-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Custom Projection #6554
Comments
Hi @bessermt, can you project your source data? Mapbox GL JS maps use the Web Mercator coordinate system PROJ4 is a popular library for coordinate transformations. it has JS bindings, as well as bindings for other languages. The client or the server could perform the projection from the source coordinate system to EPSG:3857. |
I can't use JS, AFAIK. My app will have no Internet connection and I assume the JS requires that. ??? The point is to not project the data, but to use a different map projection. The tiles are not in Mercator intentionally and changing them is not allowed. There are many uses for custom map projections, not the least of which is games. From what I can see, exposing the projection would be super easy to code, only requiring 2 functions to use a callbacks instead of direct calls. Current users would see no changes to existing code. Unbelievably simple, extremely useful, but not done. Seems very strange that custom projections are not supported. Google supports them, but only in their JS version. This would allow a jump ahead of Google if that matters. |
Please refrain from evaluating the technical difficulty of this work, especially in a larger system. There are very valid reasons why projections are not supported more broadly, on a product (you can't mix projections), standards (no standard scale sets) and performance (on-the-fly reprojection) dimensions. Or, if you're confident that it is a two-line fix, then we're happy to accept a pull request. |
I never claimed it was a 2 line fix. I did say it was a 2 function fix. Yes, simple. Is this not the place to make change requests? |
Yep, this is the place you can submit a pull request, through the normal GitHub flow, and see the contributing documentation to get started. |
Not a pull request, a change request. |
Could this be the way to enable custom projection in mapbox-gl-native? By using PROJ4? If so, I would like to contribute to add this feature utilizing PROJ4 lib. |
I would like to write my own custom projection code to replace the Mercator projection. I can't see how this can be done with the current code. Is this possible? If not, how can this feature be added?
The text was updated successfully, but these errors were encountered: