<div>With the getfeatureinfo-controls version, I get the map with the layer but when I click to get info nothing happens. </div><div><br></div><div>Firebugs don't get any error and show the request. And if I open it have the layer info that I want to display beside the map.</div>
<div><br></div><div><a href="http://localhost:8080/geoserver/Proj_CAT/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=Proj_CAT%3AProjectes_UTM31&QUERY_LAYERS=Proj_CAT%3AProjectes_UTM31&STYLES=&BBOX=-3.174805%2C38.253418%2C5.174805%2C43.746582&FEATURE_COUNT=10&HEIGHT=500&WIDTH=760&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fhtml&SRS=EPSG%3A4326&X=455&Y=150" target="_top" rel="nofollow" link="external">http://localhost:8080/geoserver/Proj_CAT/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=Proj_CAT%3AProjectes_UTM31&QUERY_LAYERS=Proj_CAT%3AProjectes_UTM31&STYLES=&BBOX=-3.174805%2C38.253418%2C5.174805%2C43.746582&FEATURE_COUNT=10&HEIGHT=500&WIDTH=760&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fhtml&SRS=EPSG%3A4326&X=455&Y=150</a></div>
<div><br></div><div><br></div><div>I also have this version in the /www/ folder with the openlayers.js online </div><div><script src="<a href="http://www.openlayers.org/api/OpenLayers.js" target="_top" rel="nofollow" link="external">http://www.openlayers.org/api/OpenLayers.js</a>"></script></div>
<div><br></div><div>If I try to use the downloaded version at www/openlayers/lib/openlayers.js also says that OpenLayers is not defined</div><div><br></div><div><br></div><div>The whole code is this:</div><div><br></div><div>
<!DOCTYPE html></div><div><html> </div><div><head></div><div><br></div><div><title>Prova visor auma</title></div><div><br></div><div><script src="<a href="http://www.openlayers.org/api/OpenLayers.js" target="_top" rel="nofollow" link="external">http://www.openlayers.org/api/OpenLayers.js</a>"></script></div>
<div><link rel="stylesheet" href="C:/OpenLayers-2.11/theme/default/style.css" type="text/css"></div><div> </div><div><span class="Apple-tab-span" style="white-space:pre">        </span><style type="text/css"></div>
<div> </div><div> #map{ <span class="Apple-tab-span" style="white-space:pre">                </span>height: 500px;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>width: 760px;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>margin:20px;</div>
<div> </div><div> }</div><div> #info {</div><div> position: absolute;</div><div> left:80%;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>top:15%;</div><div> }</div><div>
<span class="Apple-tab-span" style="white-space:pre">                </span></div><div> #info table td {</div><div> border:1px solid #ddd;</div><div> border-collapse: collapse;</div><div> margin: 0;</div>
<div> padding: 0;</div><div> font-size: 90%;</div><div> padding: .2em .1em;</div><div> background:#fff;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>#info table th{</div><div><span class="Apple-tab-span" style="white-space:pre">        </span> padding:.2em .2em;</div><div> text-transform: uppercase;</div>
<div> font-weight: bold;</div><div> background: #eee;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>tr.odd td {</div>
<div> background:#eee;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>table.featureInfo caption {</div><div> text-align:left;</div>
<div> font-size:100%;</div><div> font-weight:bold;</div><div> padding:.2em .2em;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}<span class="Apple-tab-span" style="white-space:pre">        </span> </div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span></div><div> </style></div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div><script defer="defer" type="text/javascript"></div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>var map, highlightlayer;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span></div><div> </div><div> function load(){</div>
<div> <span class="Apple-tab-span" style="white-space:pre">                        </span></div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>var options = {</div><div> controls: [new OpenLayers.Control.KeyboardDefaults(),</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                        </span>new OpenLayers.Control.LayerSwitcher(),</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>new OpenLayers.Control.PanZoomBar(), </div>
<div><span class="Apple-tab-span" style="white-space:pre">                                        </span>new OpenLayers.Control.ScaleLine(), </div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>new OpenLayers.Control.Navigation(),</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                        </span>new OpenLayers.Control.OverviewMap(),</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>new OpenLayers.Control.MousePosition()</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                        </span>]</div><div> };</div><div> map = new OpenLayers.Map('map', options);</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>var wms = new OpenLayers.Layer.WMS(</div><div> "OpenLayers WMS",</div>
<div> "<a href="http://vmap0.tiles.osgeo.org/wms/vmap0" target="_top" rel="nofollow" link="external">http://vmap0.tiles.osgeo.org/wms/vmap0</a>?",</div><div> {layers: 'basic'}</div><div> );</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>var Projectes_Cat = new OpenLayers.Layer.WMS(</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                        </span>"Projectes UTM31",</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>"<a href="http://localhost:8080/geoserver/Proj_CAT/wms" target="_top" rel="nofollow" link="external">http://localhost:8080/geoserver/Proj_CAT/wms</a>",</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                        </span>{</div><div> layers: 'Proj_CAT:Projectes_UTM31',transparent: 'true',isBaseLayer:"false"</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>highlightLayer = new OpenLayers.Layer.Vector("Highlighted Features", {</div>
<div> displayInLayerSwitcher: false, </div><div> isBaseLayer: false </div><div> }</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> map.addLayers ([wms, Projectes_Cat, highlightLayer]);</div><div> map.setCenter (new OpenLayers.LonLat (1,41), 7);</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span></div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span></div><div><br></div><div> infoControls = {</div><div> click: new OpenLayers.Control.WMSGetFeatureInfo({</div><div> url: '<a href="http://localhost:8080/geoserver/Proj_CAT/wms" target="_top" rel="nofollow" link="external">http://localhost:8080/geoserver/Proj_CAT/wms</a>', </div>
<div> title: 'Identify features by clicking',</div><div> layers: [Projectes_Cat],</div><div> queryVisible: true</div><div> }),</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>}</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>for (var i in infoControls) { </div><div> infoControls[i].events.register("getfeatureinfo", this, showInfo);</div><div> map.addControl(infoControls[i]); </div>
<div> }</div><div><span class="Apple-tab-span" style="white-space:pre">                </span> infoControls.click.activate();</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> }</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>function showInfo(evt) {</div><div> if (evt.features && evt.features.length) {</div>
<div> highlightLayer.destroyFeatures();</div><div> highlightLayer.addFeatures(evt.features);</div><div> highlightLayer.redraw();</div><div> } else {</div><div> $('responseText').innerHTML = evt.text;</div>
<div> }</div><div> }</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span></div><div><span class="Apple-tab-span" style="white-space:pre">        </span> <span class="Apple-tab-span" style="white-space:pre">        </span></script></div>
<div></head></div><div><br></div><div><br></div><div><body bgcolor=#F6E3CE onload="load()"></div><div><br></div><div><h1> Visor dels Projectes d'AUMA</h1></div><div><br></div><div><div id= "map"><div></div>
<div><br></div><div><div id="info"></div><div> <h3>Info dels Projectes</h3></div><div> <p><small>Click sobre els punts per detalls del projecte</small></p></div>
<div> <div id="responseText"></div></div><div> </div></div><div><br></div><div><br></div><div></body></div><div></html></div><div><br></div><div><br></div><div>I'm running out of ideas...</div>
<div><br></div>-- <br><a href="http://kikocanas.blogspot.com" target="_blank" rel="nofollow" link="external">http://kikocanas.blogspot.com</a><br>
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://osgeo-org.1560.n6.nabble.com/How-it-works-WMSGetFeatureInfo-tp4361191p4383169.html">Re: How it works WMSGetFeatureInfo??</a><br/>
Sent from the <a href="http://osgeo-org.1560.n6.nabble.com/OpenLayers-Users-f3910695.html">OpenLayers Users mailing list archive</a> at Nabble.com.<br/>