Moving from OpenLayers to Leaflet errors with: "Current y value … is too far from tile corner …"

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Moving from OpenLayers to Leaflet errors with: "Current y value … is too far from tile corner …"

Puneet Kishor
I moved from OpenLayers to Leaflet (no other change in any of the other moving parts) other than replacing 

var mylayer = new OpenLayers.Layer.WMS(
    "My Layer",
    "http://server/tilecache/tilecache.cgi",
    {layers: "mylayer", transparent: true},
    {isBaseLayer: false, opacity: 0.6, visibility: true}
);
with

var mylayer = L.tileLayer.wms("http://server/tilecache/tilecache.cgi", {
    layers: 'mylayer',
    format: 'image/png',
    transparent: true,
    attribution: 'Data from blah blah'
});
But now I get the error 

An error occurred: Current y value -5009377.085697 is too far from tile corner y -10018754.170400

Adding a `srs: "EPSG:4326"` kv pair to the Leaflet layer definition doesn't do anything as well.


Suggestions?

--
Puneet Kishor


_______________________________________________
Tilecache mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/tilecache
Reply | Threaded
Open this post in threaded view
|

Re: Moving from OpenLayers to Leaflet errors with: "Current y value … is too far from tile corner …"

Brian Case
Puneet

the issue with "Current ... value ... is too far from tile corner"
has been fixed in the svn for quite some time.



https://github.com/OSGeo/tilecache/commit/6814f19cb9361c885c136ae5bbc23151c279b510


i will try to make a new release soon


brian



On Sun, 2014-08-24 at 08:10 -0700, P Kishor wrote:

> I moved from OpenLayers to Leaflet (no other change in any of the
> other moving parts) other than replacing
>
>
> var mylayer = new OpenLayers.Layer.WMS(
>     "My Layer",
>     "http://server/tilecache/tilecache.cgi",
>     {layers: "mylayer", transparent: true},
>     {isBaseLayer: false, opacity: 0.6, visibility: true}
> );
> with
>
>
> var mylayer = L.tileLayer.wms("http://server/tilecache/tilecache.cgi", {
>     layers: 'mylayer',
>     format: 'image/png',
>     transparent: true,
>     attribution: 'Data from blah blah'
> });
> But now I get the error
>
>
> An error occurred: Current y value -5009377.085697 is too far from
> tile corner y -10018754.170400
>
>
>
> Adding a `srs: "EPSG:4326"` kv pair to the Leaflet layer definition
> doesn't do anything as well.
>
>
> More details are also at
> http://gis.stackexchange.com/questions/111550/moving-from-openlayers-to-leaflet-breaks-tilecache 
>
>
> Suggestions?
>
>
> --
> Puneet Kishor
>
>
> _______________________________________________
> Tilecache mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/tilecache


_______________________________________________
Tilecache mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/tilecache