[OpenLayers-Users] Maximum extent shrinks when zooming in
Christopher Schmidt
crschmidt at metacarta.com
Tue Apr 15 18:09:36 EDT 2008
On Tue, Apr 15, 2008 at 03:00:28PM -0700, zenzero-2001 wrote:
>
> Hi Christopher,
>
> That's interesting that's it's not considered a bug. Personally, I would
> definitely think of it as a bug or possibly an undocumented feature :) I
> hope you don't think that I was complaining, I think that OpenLayers is
> great.
Well, if you think there's a bug, you need to do further description of
the issue to convince me, is all. What you have described so far sounds
to me to be not a bug. What you have described so far sounds to me like:
* I have a map, from (for example) -10, -3, 10, 3
* I set a maxResolution of 6 / 256, so that my whole world fits
vertically within one 256 px tile
* Because my map is 20 units wide, it is 4 tiles wide, and therefore
covers more than -10 -> 10 in the longitude direction: 24 degrees.
* When I zoom in, my resolution drops to 6/512:
* Vertically, the world is two tiles.
* Horizontally, it is 7 tiles -- taking up less horizontal
geographic space than before: 21 degrees.
Since you've said you can change your maxResolution, and it 'solves' the
problem, I assume that you've found that if you pick a maxResolution
that divides *evenly* into the width *and* height (in this case,
something like '2' would do: 3 tiles high, 10 tiles wide), you will see
that the tiles match your geographic space correctly.
If this is *not* what you're describing, then you'll need to be more
clear, because this behavior isn't a bug: in fact, I don't know of any
way around it.
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list