[OpenLayers-Users] Ka-Map layer issues
Christopher Schmidt
crschmidt at crschmidt.net
Mon Aug 28 07:36:07 CDT 2006
On Mon, Aug 28, 2006 at 12:38:45PM +0300, Ehud Shabtai wrote:
> Hi All,
>
> I've been playing with OpenLayers using a Ka-Map layer with some hard
> coded scale values and I'm having some problems.
>
> First, here's how I initialize the map:
>
> map = new OpenLayers.Map('map', {controls: [], scales: [4000000,
> 2000000, 750000, 300000, 150000, 75000, 30000, 10000, 5000],
> units:'degrees', maxExtent: new OpenLayers.Bounds(34,29,36.4,33.6),
> maxResolution: "auto",});
>
> then I just add the ka-map layer and some controls.
>
> I'm using hard coded scales as I want to use ka-map's precache script
> which generates all the required tiles of a map.
>
> The problem is that OpenLayers does not always fetch the correct tile.
> This is not consistent, but panning in the same scale sometimes works
> fine and sometimes doesn't. When it doesn't I can see that OpenLayers
> tries to fetch a tile which does not exists (the meta-tile exists,
> however the tile part of the URL is incorrect).
Can you copy a URL of such a broken tile and send it here? it's possible
that the coordinate is having some sort of rounding error, and that
would be easiest checked given a sample failing URL.
> A second problem is that the Permalink control doesn't work. Actually
> it seems to produce the correct URLs, however, OpenLayers does not
> handle them correctly when I try to open a new map.
You must add the Permalink after performing any centering/zooming
operations, or make them conditional on the center not yet being set.
Otherwise, you set the center with the permalink, and then you set the
center again manuallly :)
Regards,
--
Christopher Schmidt
Web Developer
More information about the Users
mailing list