[Tilecache] Question about tilecache and wms layers

David Alda Fernandez de Lezea dalda at ikt.es
Wed Jan 20 07:02:01 EST 2010


Hello list,
 
I've got an application that works fine with some wms layers served by mapserver and using tilecache 2.10. These layers are 2 big raster files. As i said this works fine, the tiles are generated in my HD, and the app seems to be more quicker. Now I've got a set of three layers that I want to show through my app. These layers, are taken from oracle spatial and served by mapserver via wms, and they're big tables (over a milion rows). My idea is to also render these layers with tilecache, but I'm not sure this makes sense. Anyway, I'm trying to do it but when I activate the layer, there appears pink squares.My configuration is as follows:
 
(I've been trying with the three layers at once, but here I show my attempt with only one layer and it also DOESN'T work)
 
WMS MapServer MapFile
 
LAYER
  STATUS ON
  CONNECTIONTYPE oraclespatial
  CONNECTION "XXX/XXX at ORACLEDB"
  NAME "RecintosSigpac"
  PROJECTION
   "init=epsg:23030"
  END
  DUMP TRUE
  TYPE POLYGON
  METADATA
   "wms_title"     "Recintos Sigpac 2009"
   "wms_srs"             "EPSG:23030"
   "wms_name"            "recintos"
   "wms_server_version"  "1.1.1"
   "wms_format"          "image/png"
   "wms_transparent"     "true"
   "wms_extent"    "470000 4700000 610000 4820000"
   "gml_include_items"   "all"
  END 
   
  DATA "GEOMETRY FROM (SELECT * FROM MY_TABLE) USING UNIQUE gid SRID 82337"   

  CLASS
   NAME "Recintos"
   STYLE
    OUTLINECOLOR 0 234 0
   END
   #TEMPLATE "ttt_query.html"
   TEMPLATE "plantilla_prueba.html"
  END
 END
 
TileCache.cfg
 
[RecintosSigpac]
type=WMS
layers=RecintosSigpac
srs=EPSG:23030
bbox=470000, 4700000, 610000, 4820000
url=http://myurl_to_mapserver
 
And finally OpenLayers layer object:
 
   extentDif = 610000 - 470000;
   maxRes = extentDif / 512;
   twms = new OpenLayers.Layer.WMS( "recintos", 
   "http://localhost/cgi-bin/tilecache-2.10/tilecache.py?",
   { transparent: 'true', layers: 'RecintosSigpac'},{isBaseLayer: false,visibility: false, units: 'm', maxExtent: new OpenLayers.Bounds(470000, 4700000, 610000, 4820000),maxResolution: maxRes} );
   
   map.addLayer(twms);
 
I hope I've explained everything properly.

If anyone can help me, please. Thanks again.
 

 

 

Un saludo,

 

··················································································


David Alda Fernández de Lezea

Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad

 

IKT

Granja Modelo s/n · 01192 · Arkaute (Araba)


··················································································
Tlfnos.: 945-00-32-95                         Fax: 945-00.32.90
··················································································
email: dalda at ikt.es                                web: www.ikt.es <http://www.ikt.es/> 
··················································································

_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users



More information about the Tilecache mailing list