<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"><div>Hello nice people,</div><div><br></div><div>i am trying to display get feature info of WMS layers coming from my geoserver. I do not have much experience with open layers and geoserver as well.</div><div><br></div><div>This is what geoserver preview layers give to me:</div><div><br></div><div><div>// support GetFeatureInfo</div><div> map.events.register('click', map, function (e) {</div><div> document.getElementById('nodelist').innerHTML = "Loading... please wait...";</div><div> var params = {</div><div> REQUEST:
"GetFeatureInfo",</div><div> EXCEPTIONS: "application/vnd.ogc.se_xml",</div><div> BBOX: map.getExtent().toBBOX(),</div><div> X: e.xy.x,</div><div> Y: e.xy.y,</div><div> INFO_FORMAT: 'text/html',</div><div> QUERY_LAYERS: map.layers[0].params.LAYERS,</div><div> FEATURE_COUNT: 50,</div><div> Layers:
'sf:bugsites',</div><div> Styles: '',</div><div> WIDTH: map.size.w,</div><div> HEIGHT: map.size.h,</div><div> format: format};</div><div><span> OpenLayers.loadURL("<a target="_blank" href="http://localhost:8080/geoserver/wms">http://localhost:8080/geoserver/wms</a>", params, this, setHTML, setHTML);</span></div><div> OpenLayers.Event.stop(e);</div><div> });</div><div>
}</div></div><div><br></div><div><div> function setHTML(response){</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span></div><div> document.getElementById('nodelist').innerHTML = response.responseText;</div><div> };</div></div><div><br></div><div><br></div><div>But in my case, I want to display the getfeatureinfo not in a external div but on a openlayers right beside the where user have clicked. If, any one could provide me a working code to do this and explain in a coincise manner ??</div><div><br></div><div>Sorry if this is too basic stuff for some people ! I am in class 1 of openlayers and geoserver
:))</div><div><br></div><div>Sukuchha </div><div><br></div><div style="position:fixed"></div>
</div></body></html>