Skip to content

leaflet-grids with proj4 #6

@d33q

Description

@d33q

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']
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions