[OpenLayers-Users] TileCache works when used through wms layer but not as a TileCache Layer

Lance Dyas lancelot at inetnebr.com
Fri Jan 11 00:51:27 EST 2008


The fix is great and the tilecache layer is working nicely ... but isnt 
there always a but...
this is probably an easy one.. ;-) the overview map now isnt recognising 
the
layer name properly in the urls it requests...
http://www.dyasdesigns.com/tiles/%5Bobject%20Object%5D/08/000/000/000/000/000/000.png

http://www.dyasdesigns.com/croatia/zagrebopen2.htm

Erik Uzureau wrote:
> Hi Brent, thanks for this patch... it looks like a good fix. Do you
> think you could turn this into a ticket? I think this is something we
> should have in OpenLayers.
>
> E
>
> On 1/10/08, Brent Pedersen <bpederse at gmail.com> wrote:
>   
>> here's a patch that fixes that. i just checked the code in Layer.py
>> from tilecache to see what it did.
>>
>> svn diff TileCache.js
>> Index: TileCache.js
>> ===================================================================
>> --- TileCache.js        (revision 5710)
>> +++ TileCache.js        (working copy)
>> @@ -103,8 +103,8 @@
>>         var res = this.map.getResolution();
>>         var bbox = this.maxExtent;
>>         var size = this.tileSize;
>> -        var tileX = Math.floor((bounds.left - bbox.left) / (res * size.w));
>> -        var tileY = Math.floor((bounds.bottom - bbox.bottom) / (res * size.h));
>> +        var tileX = Math.round((bounds.left - bbox.left) / (res * size.w));
>> +        var tileY = Math.round((bounds.bottom - bbox.bottom) / (res * size.h));
>>         var tileZ = this.map.zoom;
>>         /**
>>          * Zero-pad a positive integer.
>>
>>
>>
>> On Jan 10, 2008 10:23 AM, Erik Uzureau <erik.uzureau at metacarta.com> wrote:
>>     
>>> Hi everyone... Lance is still stuck on this. Can anyone help?
>>>
>>> Here is an updated email that he's sent. Notice how there is a
>>> stripe of duplicated tiles on the lefthand side... seems strange.
>>>
>>> http://www.dyasdesigns.com/croatia/zagrebopenerror.htm
>>>
>>>
>>> -e
>>>
>>>
>>> On 12/9/07, Lance Dyas <lancelot at inetnebr.com> wrote:
>>>       
>>>> To give a little more clue the most obvious error is
>>>>  TileCache Layer is doubling a Stripe of the tiles on left side at the
>>>> outer most zoom
>>>>
>>>> http://www.dyasdesigns.com/croatia/zagrebopen2.htm
>>>>
>>>> after zooming in some of the top row(s) of tiles are being repeated
>>>>
>>>> Lance Dyas wrote:
>>>>         
>>>>> Works great as a WMS but and through TileCache but not as  TileCache Layer
>>>>>
>>>>> here it is as a WMS
>>>>> http://www.dyasdesigns.com/croatia/zagrebopen.htm
>>>>>
>>>>> but switching to a TileCache.... layer does some wierd things.. really
>>>>> wierd things?
>>>>> http://www.dyasdesigns.com/croatia/zagrebopen2.htm
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> Users at openlayers.org
>>>>> http://openlayers.org/mailman/listinfo/users
>>>>>
>>>>> .
>>>>>
>>>>>
>>>>>           
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at openlayers.org
>>>> http://openlayers.org/mailman/listinfo/users
>>>>
>>>>         
>>> _______________________________________________
>>> Users mailing list
>>> Users at openlayers.org
>>> http://openlayers.org/mailman/listinfo/users
>>>
>>>       
>
> .
>
>   




More information about the Users mailing list