|
|
|
Hanno79
|
hello list,
I'm new in using TileCache with OpenLayers. Perhaps you can help me. I try to make Tiles for different Layers. First I have some Polygons with region-borders. After this I have some background data like streets for example. In my OpenLayers file I use the follwing code: var url = "http://webgis.hsw.ch/GINES/Styling/mysld_bezirke.php?"; var urlFusion = "http://webgis.hsw.ch/GINES/Styling/mysld_fusion.php?"; var urlArray = ["http://webgis.hsw.ch/cgi-bin/mapserv.exe?", "http://195.176.253.211/cgi-bin/mapserv.exe?"]; var urlArrayTC = ["http://webgis.hsw.ch/cgi-bin/tilecache/tilecache.cgi?"]; var mapFile = "../htdocs/GINES/Maps/Gemeinden_Bern.map"; var options1 = { maxExtent: new OpenLayers.Bounds(555100,129900,678450,245000), maxScale: '500', minScale: '458262', resolutions:[481.8359375, 240.91796875, 120.458984375, 60.2294921875, 30.11474609375, 15.057373046875, 7.5286865234375, 3.76434326171875, 1.882171630859375, 0.9410858154296875, 0.47054290771484375, 0.23527145385742188, 0.11763572692871094, 0.058817863464355469, 0.029408931732177734, 0.014704465866088867, 0.0073522329330444336, 0.0036761164665222168, 0.0018380582332611084, 0.0009190291166305542], maxresolution:481.8359375, minresolution:0.0009190291166305542, units: 'm', projection: "EPSG:21781", controls: [] }; var map = new OpenLayers.Map('map',options1); var wms = new OpenLayers.Layer.WMS("Gemeinden",urlArrayTC, {map:mapFile,layers:layerName,format:"image/png",EXCEPTIONS:"application/vnd.ogc.se_inimage"} ); var sld_string=url+"jahr="+jahr+"&indikator="+indikator1+"&klassen="+klassen+"&vis="+vis+"&fusion="+jahr4+"&farbe="+farbe; wms.mergeNewParams({ SLD:sld_string}); You can see that i'm using an skript which generates an sld file. This file works with the mergeNewParams Parameter. I get the data out of a postgreSQL database. In my tilecache.cfg file I have this code: [gemeinden_2008] type=WMS url=http://webgis.hsw.ch/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map #mapfile=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map layers=gemeinden_2008 maxresolution=481.8359375 minresolution=0.0009190291166305542 resolutions=481.8359375, 240.91796875, 120.458984375, 60.2294921875, 30.11474609375, 15.057373046875, 7.5286865234375, 3.76434326171875, 1.882171630859375, 0.9410858154296875, 0.47054290771484375, 0.23527145385742188, 0.11763572692871094, 0.058817863464355469, 0.029408931732177734, 0.014704465866088867, 0.0073522329330444336, 0.0036761164665222168, 0.0018380582332611084, 0.0009190291166305542 levels=5 extension=png extent_type=loose srs=EPSG:21781 bbox=555100,129900,678450,245000 metaTile=true ---------------------------------------------- [seen] type=WMS url=http://webgis.hsw.ch/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map #mapfile=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map layers=seen extension=png transparency=true extent_type=loose srs=EPSG:21781 bbox=555100,129900,678450,245000 -------------------------------------------- And now I have a problem. For the Layer "seen" all works fine I get the Tiles and all is ok. In my TielCache Directory I have the different png files. But with the Layer "gemeinden_2008" it doesn't work. I only get white images. On the Server in the TielCache Directory I have different white images without the map-data. I don't know where what I have to do to correct the error. Perhaps somebody can help me. I use OpenLayers 2.8 with UMN Mapserver and PostgreSQL database. Thank you very much for your help. Greetings Hanno Rahn |
||||||||||||||||
|
fmsd91
|
Some javascript/style in this post has been disabled (why?)
I have the same issue trying to seed the following layer: -------------------------------------------------------- [global] type=WMS url=http://158.109.174.111:8080/fcgi-bin/wms?map=C:\ms4w\maps\map\wms.map layers=global_mosaic bbox=180000,4600000,400000,4870000 srs=EPSG:4326 maxResolution=1132.8125 extension=jpeg debug=true size=512,512 bbox=415000,-200000,7500000,6000000 -------------------------------------------------------- My global layer in mapserver is defined like: -------------------------------------------------------- LAYER # MODIS WMS map from JPL NAME 'global_mosaic' TYPE RASTER OFFSITE 0 0 0 STATUS ON CONNECTIONTYPE WMS CONNECTION "http://onearth.jpl.nasa.gov/wms.cgi?" TOLERANCE 7 TOLERANCEUNITS pixels MAXSCALEDENOM 2000000 METADATA "wms_srs" "EPSG:4326" "wms_name" "global_mosaic" "wms_server_version" "1.1.1" "wms_format" "image/jpeg" END PROJECTION "init=epsg:4326" END END # Modis WMS image ends here -------------------------------------------------------- I get blank tiles... Thanks for any help! Francisco Domingues > Date: Thu, 15 Oct 2009 01:58:58 -0700 > From: [hidden email] > To: [hidden email] > Subject: [Tilecache] TileCache only results in white images > > > hello list, > > I'm new in using TileCache with OpenLayers. Perhaps you can help me. > > I try to make Tiles for different Layers. First I have some Polygons with > region-borders. After this I have some background data like streets for > example. > > In my OpenLayers file I use the follwing code: > > var url = "http://webgis.hsw.ch/GINES/Styling/mysld_bezirke.php?"; > > var urlFusion = "http://webgis.hsw.ch/GINES/Styling/mysld_fusion.php?"; > > var urlArray = ["http://webgis.hsw.ch/cgi-bin/mapserv.exe?", > "http://195.176.253.211/cgi-bin/mapserv.exe?"]; > > var urlArrayTC = ["http://webgis.hsw.ch/cgi-bin/tilecache/tilecache.cgi?"]; > > var mapFile = "../htdocs/GINES/Maps/Gemeinden_Bern.map"; > > > > var options1 = { > > maxExtent: new OpenLayers.Bounds(555100,129900,678450,245000), > > maxScale: '500', > > minScale: '458262', > > resolutions:[481.8359375, 240.91796875, 120.458984375, > 60.2294921875, 30.11474609375, 15.057373046875, 7.5286865234375, > 3.76434326171875, 1.882171630859375, 0.9410858154296875, > 0.47054290771484375, 0.23527145385742188, 0.11763572692871094, > 0.058817863464355469, 0.029408931732177734, 0.014704465866088867, > 0.0073522329330444336, 0.0036761164665222168, 0.0018380582332611084, > 0.0009190291166305542], > > maxresolution:481.8359375, > > minresolution:0.0009190291166305542, > > units: 'm', > > projection: "EPSG:21781", > > controls: [] > > }; > > > > var map = new OpenLayers.Map('map',options1); > > > > var wms = new OpenLayers.Layer.WMS("Gemeinden",urlArrayTC, > {map:mapFile,layers:layerName,format:"image/png",EXCEPTIONS:"application/vnd.ogc.se_inimage"} > ); > > > > var > sld_string=url+"jahr="+jahr+"&indikator="+indikator1+"&klassen="+klassen+"&vis="+vis+"&fusion="+jahr4+"&farbe="+farbe; > > > > wms.mergeNewParams({ SLD:sld_string}); > > > You can see that i'm using an skript which generates an sld file. This file > works with the mergeNewParams Parameter. > > I get the data out of a postgreSQL database. > > In my tilecache.cfg file I have this code: > > [gemeinden_2008] > > type=WMS > > url=http://webgis.hsw.ch/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map > > #mapfile=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map > > layers=gemeinden_2008 > > maxresolution=481.8359375 > > minresolution=0.0009190291166305542 > > resolutions=481.8359375, 240.91796875, 120.458984375, 60.2294921875, > 30.11474609375, 15.057373046875, 7.5286865234375, 3.76434326171875, > 1.882171630859375, 0.9410858154296875, 0.47054290771484375, > 0.23527145385742188, 0.11763572692871094, 0.058817863464355469, > 0.029408931732177734, 0.014704465866088867, 0.0073522329330444336, > 0.0036761164665222168, 0.0018380582332611084, 0.0009190291166305542 > > levels=5 > > extension=png > > extent_type=loose > > srs=EPSG:21781 > > bbox=555100,129900,678450,245000 > > metaTile=true > > ---------------------------------------------- > > [seen] > type=WMS > url=http://webgis.hsw.ch/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map > #mapfile=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map > layers=seen > extension=png > transparency=true > extent_type=loose > srs=EPSG:21781 > bbox=555100,129900,678450,245000 > > -------------------------------------------- > > And now I have a problem. > For the Layer "seen" all works fine I get the Tiles and all is ok. In my > TielCache Directory I have the different png files. > > But with the Layer "gemeinden_2008" it doesn't work. I only get white > images. On the Server in the TielCache Directory I have different white > images without the map-data. > > I don't know where what I have to do to correct the error. Perhaps somebody > can help me. > > I use OpenLayers 2.8 with UMN Mapserver and PostgreSQL database. > > Thank you very much for your help. > > Greetings > Hanno Rahn > > -- > View this message in context: http://n2.nabble.com/TileCache-only-results-in-white-images-tp3828062p3828062.html > Sent from the TileCache mailing list archive at Nabble.com. > _______________________________________________ > Tilecache mailing list > [hidden email] > http://openlayers.org/mailman/listinfo/tilecache Novo Internet Explorer 8: faça tudo com menos cliques. Baixe agora, é gratis! _______________________________________________ Tilecache mailing list [hidden email] http://openlayers.org/mailman/listinfo/tilecache |
||||||||||||||||
|
fmsd91
|
In reply to this post
by Hanno79
Some javascript/style in this post has been disabled (why?)
I noticed that you have many resolutions in tilecache.cfg for only 5 levels... Francisco Domingues > Date: Thu, 15 Oct 2009 01:58:58 -0700 > From: [hidden email] > To: [hidden email] > Subject: [Tilecache] TileCache only results in white images > > > hello list, > > I'm new in using TileCache with OpenLayers. Perhaps you can help me. > > I try to make Tiles for different Layers. First I have some Polygons with > region-borders. After this I have some background data like streets for > example. > > In my OpenLayers file I use the follwing code: > > var url = "http://webgis.hsw.ch/GINES/Styling/mysld_bezirke.php?"; > > var urlFusion = "http://webgis.hsw.ch/GINES/Styling/mysld_fusion.php?"; > > var urlArray = ["http://webgis.hsw.ch/cgi-bin/mapserv.exe?", > "http://195.176.253.211/cgi-bin/mapserv.exe?"]; > > var urlArrayTC = ["http://webgis.hsw.ch/cgi-bin/tilecache/tilecache.cgi?"]; > > var mapFile = "../htdocs/GINES/Maps/Gemeinden_Bern.map"; > > > > var options1 = { > > maxExtent: new OpenLayers.Bounds(555100,129900,678450,245000), > > maxScale: '500', > > minScale: '458262', > > resolutions:[481.8359375, 240.91796875, 120.458984375, > 60.2294921875, 30.11474609375, 15.057373046875, 7.5286865234375, > 3.76434326171875, 1.882171630859375, 0.9410858154296875, > 0.47054290771484375, 0.23527145385742188, 0.11763572692871094, > 0.058817863464355469, 0.029408931732177734, 0.014704465866088867, > 0.0073522329330444336, 0.0036761164665222168, 0.0018380582332611084, > 0.0009190291166305542], > > maxresolution:481.8359375, > > minresolution:0.0009190291166305542, > > units: 'm', > > projection: "EPSG:21781", > > controls: [] > > }; > > > > var map = new OpenLayers.Map('map',options1); > > > > var wms = new OpenLayers.Layer.WMS("Gemeinden",urlArrayTC, > {map:mapFile,layers:layerName,format:"image/png",EXCEPTIONS:"application/vnd.ogc.se_inimage"} > ); > > > > var > sld_string=url+"jahr="+jahr+"&indikator="+indikator1+"&klassen="+klassen+"&vis="+vis+"&fusion="+jahr4+"&farbe="+farbe; > > > > wms.mergeNewParams({ SLD:sld_string}); > > > You can see that i'm using an skript which generates an sld file. This file > works with the mergeNewParams Parameter. > > I get the data out of a postgreSQL database. > > In my tilecache.cfg file I have this code: > > [gemeinden_2008] > > type=WMS > > url=http://webgis.hsw.ch/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map > > #mapfile=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map > > layers=gemeinden_2008 > > maxresolution=481.8359375 > > minresolution=0.0009190291166305542 > > resolutions=481.8359375, 240.91796875, 120.458984375, 60.2294921875, > 30.11474609375, 15.057373046875, 7.5286865234375, 3.76434326171875, > 1.882171630859375, 0.9410858154296875, 0.47054290771484375, > 0.23527145385742188, 0.11763572692871094, 0.058817863464355469, > 0.029408931732177734, 0.014704465866088867, 0.0073522329330444336, > 0.0036761164665222168, 0.0018380582332611084, 0.0009190291166305542 > > levels=5 > > extension=png > > extent_type=loose > > srs=EPSG:21781 > > bbox=555100,129900,678450,245000 > > metaTile=true > > ---------------------------------------------- > > [seen] > type=WMS > url=http://webgis.hsw.ch/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map > #mapfile=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map > layers=seen > extension=png > transparency=true > extent_type=loose > srs=EPSG:21781 > bbox=555100,129900,678450,245000 > > -------------------------------------------- > > And now I have a problem. > For the Layer "seen" all works fine I get the Tiles and all is ok. In my > TielCache Directory I have the different png files. > > But with the Layer "gemeinden_2008" it doesn't work. I only get white > images. On the Server in the TielCache Directory I have different white > images without the map-data. > > I don't know where what I have to do to correct the error. Perhaps somebody > can help me. > > I use OpenLayers 2.8 with UMN Mapserver and PostgreSQL database. > > Thank you very much for your help. > > Greetings > Hanno Rahn > > -- > View this message in context: http://n2.nabble.com/TileCache-only-results-in-white-images-tp3828062p3828062.html > Sent from the TileCache mailing list archive at Nabble.com. > _______________________________________________ > Tilecache mailing list > [hidden email] > http://openlayers.org/mailman/listinfo/tilecache Novo Internet Explorer 8: traduza com apenas um clique. Baixe agora, é grátis! _______________________________________________ Tilecache mailing list [hidden email] http://openlayers.org/mailman/listinfo/tilecache |
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |