openplanetary / opm

Open Planetary Mapping and Social Platform
http://openplanetarymap.org
30 stars 3 forks source link

OPM BaseMaps origin of coordinates #12

Open All4Gis opened 4 years ago

All4Gis commented 4 years ago

Hi

Just for reporting.

I'm looking at the basemaps examples and the openlayers examples are not correct using.

Screenshot from 2020-04-15 21-16-10

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.

I just wanted to inform you about this, Great job!

syonfox commented 4 months ago

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,
        })