[Tilecache] Problem with resolution

Yves Jacolin yjacolin at free.fr
Wed Feb 28 06:03:49 EST 2007


Le Mercredi 28 Février 2007 11:34, Eric Lemoine a écrit :
> On 2/28/07, Yves Jacolin <yjacolin at free.fr> wrote:
> > Le Mercredi 28 Février 2007 11:25, Eric Lemoine a écrit:
> > > On 2/28/07, Yves Jacolin <yjacolin at free.fr> wrote:
> > > > Le Mercredi 28 Février 2007 11:05, Eric Lemoine a écrit:
> > > > > On 2/28/07, Yves Jacolin <yjacolin at free.fr> wrote:
> > > > > > Hi Eric,
> > > > > >
> > > > > > Thanks very much for this tips. I get this resolutions:
> > > > > > 4938.886622189033,2469.443110945165,1411.110349115227,705.5551745
> > > > > >557 614,...
> > > > > >
> > > > > > This seems incorrect, isn'it ?
> > > > >
> > > > > Are your scales and unit correct?
> > > >
> > > > Well, here my values:
> > > >      var myScales
> > > > =[14000000,7000000,4000000,2000000,901000,451000,225000]; var options
> > > > = {scales:myScales,units: 'm'};
> > > >
> > > > The scales has been set up using the map.addControl(new
> > > > OpenLayers.Control.Scale()) control box.
> > > >
> > > > My EPSG code is 4326.
> > >
> > > First, do not use OpenLayers.Control.Scale() to set up your scales.
> > > Use something like this instead:
> > >
> > > var myScales = [ 3750, 7500, 15000, 30000, 60000, 120000 ];
> > > var options = { scales: myScales, ... };
> > > map = new OpenLayers.Map($('map'), options);
> >
> > Well what I meant is that I used OpenLayers.Control.Scale() to find my
> > scales values, I didn't use it to set up the scales actually. ;-)
>
> Ok, sorry for misunderstanding you.
Well, my english is poor ;-)
> Have you actually tried to feed TileCache with the resolution values you
> get?
Yes, here my parameters:

   [vmap]
   type=MapServerLayer
   layers=regions
   mapfile=/var/local/name/project/vmap.map
   resolutions=79.37495713752315, 159.10269186232415, 317.85260613737046, 
705.5551745557614, 1411.1103491115227, 2469.443110945165, 4938.88622189033
  extension=gif
  debug=on

And the OL parts:

  var myScales =[225000,451000,901000,2000000,4000000,7000000,14000000];
  var options = {scales:myScales};
  map = new OpenLayers.Map('map', options);

Y.
-- 
Yves Jacolin
---
http://yjacolin.gloobe.org



More information about the Tilecache mailing list