OPM BaseMaps origin of coordinates
All4Gis opened this issue · 1 comments
Hi
Just for reporting.
I'm looking at the basemaps examples and the openlayers examples are not correct using.
With leaflet this can be fixed with the tms parameter or using {-y}. Leaflet documentation, but OL doesn't have that option (or I can't find it)
For this reason the examples on this website, https://www.openplanetary.org/opm-basemaps/shaded-colour-mola-elevation, would not be correct.
We can use {-y} and in both libraries (leaflet >= 1.0) to solve this error. The same applies to the wiki https://www.openplanetary.org/opm-basemaps/shaded-colour-mola-elevation, the required TMS option is only available in leaflet <= 0.7.
The recommended way for both libraries is use {-y} instead {y}
I haven't tried them all, but they all look wrong.
- "http://s3-eu-west-1.amazonaws.com/whereonmars.cartodb.net/mola-color/{z}/{x}/{y}.png"
- "http://s3-eu-west-1.amazonaws.com/whereonmars.cartodb.net/viking_mdim21_global/{z}/{x}/{y}.png"
- "http://s3-eu-west-1.amazonaws.com/whereonmars.cartodb.net/celestia_mars-shaded-16k_global/{z}/{x}/{y}.png"
I just wanted to inform you about this, Great job!
Thanks you I ran into this same issue
For my map this is what i ended up with. note I also set the maxNativeZoom for best results
let marsUrl2 = "http://s3-eu-west-1.amazonaws.com/whereonmars.cartodb.net/viking_mdim21_global/{z}/{x}/{-y}.png" ; // note we need to use -y with the cartodb s3 store
mars2Layer = new L.tileLayer(marsUrl2, {
zoom: 3,
maxNativeZoom: 7,
minNativeZoom: 0,
maxZoom: 24,
minZoom: 0,
tms: false,
})