[OpenLayers-Users] how-to calculate resolutions for custom tiles
Greg Donald
gdonald at gmail.com
Tue Dec 9 15:33:36 EST 2008
On Tue, Dec 9, 2008 at 1:48 PM, Christopher Schmidt
<crschmidt at metacarta.com> wrote:
>> //resolutions: [ 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1 ],
>> //resolutions: [ 256, 128, 64, 32, 16, 8, 4, 2, 1, 0.5, 0.25 ],
>> //resolutions: [ 1, 0.5, 0.25, 0.125, 0.0625, 0.03125, 0.015625,
>> 0.0078125, 0.00390625, 0.001953125, 0.0009765625 ],
It does work really well, but something is still not quite right,
maybe it's other settings.
> I'd expect this last one to work. You could also simply set
> "maxResolution": 1, and it would calculate the rest on its own. What
> aspect of that isn't working for you?
On the top row, on some resolutions, I get calls for images with
negative coordinates. I'm not sure why that's happening since I'm
using
maxExtent: new OpenLayers.Bounds( 0, 0, 1667867, 403 )
and all my bounds are positive. I can't provide a (0, -1) image since
non exist.
Another issue is that when I use
restrictedExtent: new OpenLayers.Bounds( 0, 0, 1667867, 403 )
some of the top row tiles are hidden from view, I cannot even drag to see it.
But if I don't set restrictedExtent: to something I get an ugly black
border around my entire map.
Thanks,
--
Greg Donald
http://destiney.com/
More information about the Users
mailing list