On 12 March 2012 10:46, Mustafa646 <[email protected]> wrote: > I have download a tiff image (world imagery) from > http://www.naturalearthdata.com/downloads/10m-raster-data/10m-cross-blend-hypso/ > > Then i Geo-referenced this image by using this command: > gdal_translate -of GTiff -a_srs epsg:4326 -co tiled=yes test.tiff > georeferenced.tif > > Finally, I published this image as Geotiff raster on Geoserver and tried to > display as WMS base layer in Openlayers application as: > > var wmslayer1 = new OpenLayers.Layer.WMS("Third party Image tiles", > GEOSERVER_WMS_URL, { 'layers': 'TestSpace:GeoHyp_LR', 'format': > 'image/GEOTIFF' }, { 'opacity': 1.0, 'isBaseLayer': true, 'visibility': true > }); >
GeoServer doesn't produce maps in image/GEOTIFF format. You are confusing the input and output formats of the WMS. GeoServer is already aware that your image is a GeoTiff from the way you added the layer to it. OpenLayers meanwhile is expecting that the map be sent using png, gif or jpeg - for best results leave the format option out of the request as OpenLayers will fill it in with whatever it wants. Ian ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
