TileCache - tilecache.cfg

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

TileCache - tilecache.cfg

Ben Brehmer
I am using the following tilecache.cfg file but the "[layername]"
section doesn't seem to be setting the default values. For example when
Tiles are requested the apache access log indicates a tile size of
256x256 although I have set the size to 400x400 in tilecache.cfg.

Is there something blatantly wrong with my tilecache.cfg file?


tilecache.cfg:

[cache]
type=DiskCache
base=/home/httpd/cf2/html/cache/

[layername]
type=WMSLayer
layers=TileCache-Nov25
size=400,400

[TileCache-Nov25]
type=WMSLayer
url=http://office.refractions.net/ms/cgi-bin/mapserv-4.6.2?map=/home/httpd/cf2/html/maps/basemap.map
extension=png


Apache Log:
192.168.50.1 - - [04/Dec/2006:14:19:30 -0800] "GET
/cgi-bin/tilecache-1.1/tilecache.cgi?LAYERS=TileCache-Nov25&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=EPSG:4326&BBOX=-82.792969,65.43457,-82.749023,65.478516&WIDTH=256&HEIGHT=256
HTTP/1.1" 200 224


Thanks,

Ben
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: TileCache - tilecache.cfg

Tim Schaub-2
>
> [layername]
> type=WMSLayer
> layers=TileCache-Nov25
> size=400,400
>
>
> Apache Log:
> 192.168.50.1 - - [04/Dec/2006:14:19:30 -0800] "GET
> /cgi-bin/tilecache-1.1/tilecache.cgi?LAYERS=TileCache-Nov25&FO
RMAT=image/png&SERVICE=WMS&VERSION=1.1.1>
&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inim
> age&SRS=EPSG:4326&BBOX=-82.792969,65.43457,-82.749023,65.47851
> 6&WIDTH=256&HEIGHT=256
> HTTP/1.1" 200 224
>

Apache is logging what your client is requesting from tilecache.cgi.  Since
your client (OpenLayers) knows nothing about your tilecache.cfg, it's asking
for whatever you tell it to.  The default tile size in OpenLayers is
256x256.

TileCache thinks this client is ignorant and serves up what the
tilecache.cfg tells it to.

>
> Thanks,
>
> Ben
> _______________________________________________
> Users mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/users
>

_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Displaying a static map

Xiaopeng Xiong
In reply to this post by Ben Brehmer
Hello List,

I am new to the Openlayers, so please forgive me if my question is too
simple for you.

I want to embed a map into my html page. The requirements are as follows.

1. The map shows the rough boundary of United States.
2. The map has to be static and it will not zoom-in/out or move by dragging,
it is just like a static image. No control pan is needed.
3. When the user selects a rectangluar range, the corresponding
longitude/latitude of the range will be shown.

I started from the provided live demo at
http://www.openlayers.org/dev/examples/lonlatfrompx.html
and I created a map without any control by using
    var map = new OpenLayers.Map('map', { controls: [] });

However, I have no idea on how to initialize the map to a specific area
(e.g., around United States). Currently it displays the map of the whole
world.

I will appreciate any help. Thank you.


Best regards,
Xiaopeng



_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Displaying a static map

Christopher Schmidt-2
On Mon, Dec 04, 2006 at 08:43:31PM -0500, Xiaopeng Xiong wrote:

> I started from the provided live demo at
> http://www.openlayers.org/dev/examples/lonlatfrompx.html
> and I created a map without any control by using
>     var map = new OpenLayers.Map('map', { controls: [] });
>
> However, I have no idea on how to initialize the map to a specific area
> (e.g., around United States). Currently it displays the map of the whole
> world.
>
> I will appreciate any help. Thank you.

map.zoomToExtent(
  new penLayers.Bounds(-125.64,25.70,-70.18,50.93)
);

Should get you the right area -- tweak as needed.

Regards,
--
Christopher Schmidt
MetaCarta
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Displaying a static map

Christopher Schmidt-2
On Mon, Dec 04, 2006 at 08:49:41PM -0500, Christopher Schmidt wrote:

> On Mon, Dec 04, 2006 at 08:43:31PM -0500, Xiaopeng Xiong wrote:
> > I started from the provided live demo at
> > http://www.openlayers.org/dev/examples/lonlatfrompx.html
> > and I created a map without any control by using
> >     var map = new OpenLayers.Map('map', { controls: [] });
> >
> > However, I have no idea on how to initialize the map to a specific area
> > (e.g., around United States). Currently it displays the map of the whole
> > world.
> >
> > I will appreciate any help. Thank you.
>
> map.zoomToExtent(
>   new penLayers.Bounds(-125.64,25.70,-70.18,50.93)
> );

Ack! Something ate my O!

 map.zoomToExtent(
   new OpenLayers.Bounds(-125.64,25.70,-70.18,50.93)
 );

That should work better :)

Regards,
--
Christopher Schmidt
MetaCarta
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users