Hello Bryan, Thanks for the quick reply. No I am not seeing pink tiles and yes I am able to check the layer in the OpenLayers preview of Geoserver. I have also seen the source code, which is
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>OpenLayers map preview</title> <!-- Import OL CSS, auto import does not work with our minified OL.js build --> <link rel="stylesheet" type="text/css" href="http://localhost:8080/geoserver/openlayers/theme/default/style.css"/> <script defer="defer" type="text/javascript"> var map; var untiled; var tiled; var pureCoverage = true; // pink tile avoidance OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5; // make OL compute scale according to WMS spec OpenLayers.DOTS_PER_INCH = 25.4 / 0.28; function init(){ // if this is just a coverage or a group of them, disable a few items, // and default to jpeg format format = 'image/png'; if(pureCoverage) { document.getElementById('filterType').disabled = true; document.getElementById('filter').disabled = true; document.getElementById('antialiasSelector').disabled = true; document.getElementById('updateFilterButton').disabled = true; document.getElementById('resetFilterButton').disabled = true; document.getElementById('jpeg').selected = true; format = "image/jpeg"; } var bounds = new OpenLayers.Bounds( -1.49, -0.001, -1.487, 0.001 ); var options = { controls: [], maxExtent: bounds, maxResolution: 0.00001171875, projection: "EPSG:4326", units: 'degrees' }; map = new OpenLayers.Map('map', options); // setup tiled layer tiled = new OpenLayers.Layer.WMS( "NE12 - Tiled", "http://localhost:8080/geoserver/wms", { width: '512', layers: 'cite:NE12', styles: '', srs: 'EPSG:4326', height: '341', format: format, tiled: 'true', tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom }, { buffer: 0, displayOutsideMaxExtent: true } ); // setup single tiled layer untiled = new OpenLayers.Layer.WMS( "NE12 - Untiled", "http://localhost:8080/geoserver/wms", { width: '512', layers: 'cite:NE12', styles: '', srs: 'EPSG:4326', height: '341', format: format }, {singleTile: true, ratio: 1} ); map.addLayers([untiled, tiled]); ............... However, since I am trying to learn OpenLayers, I want to be able to write simple examples and expand as my understanding falls into place. A lot of this code that Geoserver generates also seems like extra parameters etc which just makes it harder for me to work through :(. I just don't know what I could be doing wrong ... Thanks, elshae BMcBride wrote: > > elshae, > > Your OL code looks correct- are you seeing pink tiles by any chance? > Check to see if your layer is visible in GeoServer by clicking on "Layer > Preview" and previewing in OpenLayers. If this works, view the source > code in the layer preview and take a look at the URL parameters to make > sure they are correct in your JavaScript code. > > BRYAN > -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Geoserver-WMS-Layer-Does-Not-Display-tp5511643p5512027.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
