Skip to content

Zoom in/out works wrong with L.CRS.EPSG3395 (version 0.6) #1796

@caiiiycuk

Description

@caiiiycuk

For some reasons we use EPSG3395 projection and when we add osm/yandex/google tiles zoom does not works correctly (map show wrong tiles).

Test case, try wheel zoom to navigate map.

<html>
<head>
    <title>Leaflet</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6/leaflet.css" />
<!--[if lte IE 8]>
    <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6/leaflet.ie.css" />
<![endif]-->

<script src="http://cdn.leafletjs.com/leaflet-0.6/leaflet.js"></script>
</head>
<body>
<div style="width:100%; height:100%" id="map"></div>
<script type='text/javascript'>
var map = new L.Map('map', {
    center: new L.LatLng(55.751901,37.615014),
     zoom: 10,
     zoomAnimation: false,
     crs: L.CRS.EPSG3395
 });
var osm = new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png');

map.addLayer(osm);
</script>

</body>
</html>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions