[Tilecache] OpenLayers, Tilecache and Custom Map using ImageLayer

Nathan Boettcher NathanB at lawtonprinting.com
Fri May 23 14:26:55 EDT 2008


Glad to know I got the maxExtent part right after looking at the OpenLayers
API docs. :)

So what if I set the maxResolution to 5, does that give me an automatic 5
zoom levels?  If so, what are they, 0-4?

I ask because despite the size of the image, it's a cartography of streets
like you'd find in your everyday maps at the store and if you zoom in past
3-4 levels it gets quite pixelated.  So really, I only want a maximum of 4
zoom levels so you can get up close to the streets but not have it
pixilated.  What would be the best configuration in that case?

Also, and this might be related, how do I get the image size so it doesn't
have black around the border when it generates the tiles?  I monkeyed with a
few different sizes but always got the black border.  Is there an optimal
size so that doesn't happen during the tile generation/seeding?

I really appreciate all the help!

-Nathan

-----Original Message-----
From: Christopher Schmidt [mailto:crschmidt at metacarta.com] 
Sent: Thursday, May 22, 2008 6:25 PM
To: Nathan Boettcher
Cc: tilecache at openlayers.org
Subject: Re: [Tilecache] OpenLayers, Tilecache and Custom Map using
ImageLayer

On Thu, May 22, 2008 at 04:53:18PM -0700, Nathan Boettcher wrote:
> Thanks for the quick response Chris.  I won't sugar coat it, I totally
> missed that line.
> 
> Being totally new to this stuff, I'm not sure what the maxresolutions
> translates to (highest zoom level?) 

resolution is 'map units per pixel'. (in this case, 'pixels per pixel').
maxResolution is most zoomed out. You got that part right on your layer.

so now you need to add: 
  maxExtent: new OpenLayers.Bounds(0,0,4000,5083)

next to your maxResolution: 16.  

>  What are normal resolutions and how did you come up with them?
> For maxExtent, you said to set it to the same as the bounding box...but as
a
> string, or as a single value for the width/height?

Neither: a bounds.

> I apologize for my lack of understanding.

No problem. Large learning curve.

Regards,
-- 
Christopher Schmidt
MetaCarta




More information about the Tilecache mailing list