Skip to content
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

leaflet-grids with proj4 #6

Open
d33q opened this issue May 18, 2017 · 2 comments
Open

leaflet-grids with proj4 #6

d33q opened this issue May 18, 2017 · 2 comments

Comments

@d33q
Copy link

d33q commented May 18, 2017

Some help with leaflet-grids and proj4.js different projection?

Sample map with custom projection:

var crs = new L.Proj.CRS.TMS('EPSG:3067',
    '+proj=utm +zone=35 +ellps=GRS80 +units=m +towgs84=0,0,0,-0,-0,-0,0 +no_defs',
    [-548576.0, 6291456.0, 1548576.0, 8388608],
    {
        resolutions: [
            8192,
            4096,
            2048,
            1024,
            512,
            256,
            128,
            64,
            32,
            16,
            8,
            4,
            2,
            1,
            0.5,
            0.25,
            0.125,
            0.0625,
            0.03125,
            0.015625
        ]
    });

var map = new L.Map('map', {
    crs: crs,
    continuousWorld: true,
    worldCopyJump: false,
    zoomControl: true
});

var tilelayer = new L.Proj.TileLayer.TMS('http://{s}.map-place.abc/map/{z}/{x}/{y}.png', crs, {
        maxZoom: 19,
        minZoom: 0,
        tileSize: 256,
        tms: true,
        continuousWorld: true,
        attribution: '©',
        subdomains: ['tile1','tile2']
});
@JesseCrocker
Copy link
Contributor

Hello, Currently leaflet-grids does not support using a custom CRS. If you would like to implement that I would welcome a pull request.

@d33q
Copy link
Author

d33q commented May 18, 2017

Thats the problem, I don'n know how to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants