Skip to content

Custom L.Transformation broke hash #47

@7Narwen

Description

@7Narwen

If L.Transformation contain any fractional number hash won't work properly. In my case after refreshing page moved to the right with large padding.

`L.CRS.Simp = L.extend({}, L.CRS.Simple, {
projection: L.Projection.LonLat,
transformation: new L.Transformation(2.06E-5, 0, -2.06E-5, 0),
// transformation: new L.Transformation(2.06, 0, -2.06, 0), // same bug, but lesser padding
scale: function (zoom) {
return Math.pow(2, zoom);
}
});
var map = L.map('map', {
crs: L.CRS.Simp,
maxZoom: 3,
minZoom: 1,
}).setView([-790, 353.0], 3);

var hash = new L.Hash(map);`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions