<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&#39;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&amp;VERSION=1.1.1&amp;REQUEST=GetFeatureInfo&amp;LAYERS=Proj_CAT%3AProjectes_UTM31&amp;QUERY_LAYERS=Proj_CAT%3AProjectes_UTM31&amp;STYLES=&amp;BBOX=-3.174805%2C38.253418%2C5.174805%2C43.746582&amp;FEATURE_COUNT=10&amp;HEIGHT=500&amp;WIDTH=760&amp;FORMAT=image%2Fpng&amp;INFO_FORMAT=text%2Fhtml&amp;SRS=EPSG%3A4326&amp;X=455&amp;Y=150" target="_top" rel="nofollow" link="external">http://localhost:8080/geoserver/Proj_CAT/wms?SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetFeatureInfo&amp;LAYERS=Proj_CAT%3AProjectes_UTM31&amp;QUERY_LAYERS=Proj_CAT%3AProjectes_UTM31&amp;STYLES=&amp;BBOX=-3.174805%2C38.253418%2C5.174805%2C43.746582&amp;FEATURE_COUNT=10&amp;HEIGHT=500&amp;WIDTH=760&amp;FORMAT=image%2Fpng&amp;INFO_FORMAT=text%2Fhtml&amp;SRS=EPSG%3A4326&amp;X=455&amp;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>&lt;script src=&quot;<a href="http://www.openlayers.org/api/OpenLayers.js" target="_top" rel="nofollow" link="external">http://www.openlayers.org/api/OpenLayers.js</a>&quot;&gt;&lt;/script&gt;</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>
&lt;!DOCTYPE html&gt;</div><div>&lt;html&gt; </div><div>&lt;head&gt;</div><div><br></div><div>&lt;title&gt;Prova visor auma&lt;/title&gt;</div><div><br></div><div>&lt;script src=&quot;<a href="http://www.openlayers.org/api/OpenLayers.js" target="_top" rel="nofollow" link="external">http://www.openlayers.org/api/OpenLayers.js</a>&quot;&gt;&lt;/script&gt;</div>
<div>&lt;link rel=&quot;stylesheet&quot; href=&quot;C:/OpenLayers-2.11/theme/default/style.css&quot; type=&quot;text/css&quot;&gt;</div><div>    </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;style type=&quot;text/css&quot;&gt;</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>    &lt;/style&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div>&lt;script defer=&quot;defer&quot;  type=&quot;text/javascript&quot;&gt;</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(&#39;map&#39;, 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>                    &quot;OpenLayers WMS&quot;,</div>
<div>                    &quot;<a href="http://vmap0.tiles.osgeo.org/wms/vmap0" target="_top" rel="nofollow" link="external">http://vmap0.tiles.osgeo.org/wms/vmap0</a>?&quot;,</div><div>                    {layers: &#39;basic&#39;}</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>&quot;Projectes UTM31&quot;,</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>&quot;<a href="http://localhost:8080/geoserver/Proj_CAT/wms" target="_top" rel="nofollow" link="external">http://localhost:8080/geoserver/Proj_CAT/wms</a>&quot;,</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                        </span>{</div><div>                     layers: &#39;Proj_CAT:Projectes_UTM31&#39;,transparent: &#39;true&#39;,isBaseLayer:&quot;false&quot;</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(&quot;Highlighted Features&quot;, {</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: &#39;<a href="http://localhost:8080/geoserver/Proj_CAT/wms" target="_top" rel="nofollow" link="external">http://localhost:8080/geoserver/Proj_CAT/wms</a>&#39;, </div>
<div>                title: &#39;Identify features by clicking&#39;,</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(&quot;getfeatureinfo&quot;, 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 &amp;&amp; evt.features.length) {</div>
<div>             highlightLayer.destroyFeatures();</div><div>             highlightLayer.addFeatures(evt.features);</div><div>             highlightLayer.redraw();</div><div>        } else {</div><div>            $(&#39;responseText&#39;).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>&lt;/script&gt;</div>
<div>&lt;/head&gt;</div><div><br></div><div><br></div><div>&lt;body bgcolor=#F6E3CE onload=&quot;load()&quot;&gt;</div><div><br></div><div>&lt;h1&gt; Visor dels Projectes d&#39;AUMA&lt;/h1&gt;</div><div><br></div><div>&lt;div id= &quot;map&quot;&gt;&lt;div&gt;</div>
<div><br></div><div>&lt;div  id=&quot;info&quot;&gt;</div><div>        &lt;h3&gt;Info dels Projectes&lt;/h3&gt;</div><div>        &lt;p&gt;&lt;small&gt;Click sobre els punts per detalls del projecte&lt;/small&gt;&lt;/p&gt;</div>
<div>        &lt;div id=&quot;responseText&quot;&gt;&lt;/div&gt;</div><div>    &lt;/div&gt;</div><div><br></div><div><br></div><div>&lt;/body&gt;</div><div>&lt;/html&gt;</div><div><br></div><div><br></div><div>I&#39;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/>