<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Roald,<div><br></div><div>I made a complete new setup and found out that the enconding of one file was not the right one. Now I can use the GS example anywhere on my site and it works. But when I try to copy the code in my index.html it's not working anymore (the map is loading but after a click there is no request). So here is my code:</div><div><br></div><div>index.html</div><div><blockquote type="cite"><span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: 11px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>"&gt;

&lt;html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>"&gt;

&lt;head&gt;
&lt;title&gt;Map&lt;/title&gt;
&lt;link rel="stylesheet" href="style.css" type="text/css" /&gt;

&lt;script src="<a href="http://maps.google.com/maps?file=api&amp;amp;v=2&amp;amp;key=[Google">http://maps.google.com/maps?file=api&amp;amp;v=2&amp;amp;key=[Google</a> API Key]"&gt;&lt;/script&gt;
&lt;script src="OL/OpenLayers.js"&gt;&lt;/script&gt;
&lt;script src="javascript/karte2.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;/head&gt;

&lt;body onload="init()"&gt;

&lt;div id="header"&gt;
&lt;div id="ueberschrift"&gt;&lt;h2&gt;Map&lt;/h2&gt;&lt;/div&gt;
&lt;p id="subtitle"&gt;Map&lt;/p&gt;
&lt;/div&gt;

&lt;div id="inhalt"&gt;

&lt;div id="map" class="smallmap"&gt;&lt;/div&gt;

&lt;div id="seitenleiste"&gt;
&lt;/div&gt;

&lt;div id="nodelist"&gt;
   &lt;em&gt;Click on the map to get feature info&lt;/em&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</span></blockquote></div><div><br></div><div>Karte2.js</div><div><blockquote type="cite"><span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: 11px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">function init(){

    var options = {
        controls: [],
    };

    var map = new OpenLayers.Map('map', options);

    var gphy = new OpenLayers.Layer.Google(
        "Google Physical",
        {type: G_PHYSICAL_MAP}
    );
    var gmap = new OpenLayers.Layer.Google(
        "Google Streets",
        {numZoomLevels: 20}
    );
    var ghyb = new OpenLayers.Layer.Google(
        "Google Hybrid",
        {type: G_HYBRID_MAP, numZoomLevels: 20}
    );
    var satellite = new OpenLayers.Layer.Google(
        "Google Satellite",
        {type: G_SATELLITE_MAP}
    );
    var wms = new OpenLayers.Layer.WMS(
        "My Map",
        "<a href="http://myownhomepage.xyz/geoserver/wms">http://myownhomepage.xyz/geoserver/wms</a>",
        {
            srs: 'EPSG:4326',
            layers: 'Map2:Layer',
            transparent: 'TRUE'
        },
        {
            'reproject': true
        }
    );

    map.addLayers([satellite, wms, gphy, gmap, ghyb]);
    map.setCenter(new OpenLayers.LonLat(12.5000,47.5000), 15);
    
    map.addControl(new OpenLayers.Control.LayerSwitcher() );
    map.addControl(new OpenLayers.Control.Navigation());
    map.addControl(new OpenLayers.Control.MousePosition({element: $('location')}));
    map.addControl(new OpenLayers.Control.Permalink('permalink'));
        map.addControl(new OpenLayers.Control.PanZoomBar({
            position: new OpenLayers.Pixel(2, 15)
        }));

                map.events.register('click', map, function (e) {
                    document.getElementById('nodelist').innerHTML = "Loading... please wait...";
                    var params = {
                        REQUEST: "GetFeatureInfo",
                        EXCEPTIONS: "application/vnd.ogc.se_xml",
                        BBOX: map.getExtent().toBBOX(),
                        X: e.xy.x,
                        Y: e.xy.y,
                        INFO_FORMAT: 'text/html',
                        QUERY_LAYERS: map.layers[0].params.LAYERS,
                        FEATURE_COUNT: 50,
                        Srs: 'EPSG:4326',
                        Layers: 'Map2:Layer',
                        Styles: '',
                        WIDTH: map.size.w,
                        HEIGHT: map.size.h,
                        format: format};
                    OpenLayers.loadURL("<a href="http://myownhomepage.xyz/geoserver/wms">http://myownhomepage.xyz/geoserver/wms</a>", params, this, setHTML, setHTML);
                    OpenLayers.Event.stop(e);
                });
}
function setHTML(response){
document.getElementById('nodelist').innerHTML = response.responseText;
};</span></blockquote></div><div><br></div><div>It is strange now but there is no request in Firebug. When I click on the map the text switches to "Loading please wait" and that's it. Maybe the problem is because of the different layers?</div><div><br></div><div>Thank you very much for your help!</div><div><br></div><div>Pascal</div><div><br></div><div><br><div><div>Am 10.05.2010 um 00:06 schrieb Roald de Wit:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi Pascal,<br><br>You should pretty much always get at least *something* back: either an error or an empty reponse (FireBug would tell you). Have you really got ":80" in your settings like below?<br><br> &nbsp;&nbsp;&nbsp;OpenLayers.loadURL("<a href="http://myownhomepage.xyz:80/geoserver/wms">http://myownhomepage.xyz:80/geoserver/wms</a>", params, this, setHTML, setHTML);<br><br>If your Tomcat runs on port 80 then you can leave out the port number. That might do the trick (and yes, it would then have been a proxy issue). Like this:<br><br> &nbsp;&nbsp;&nbsp;OpenLayers.loadURL("<a href="http://myownhomepage.xyz/geoserver/wms">http://myownhomepage.xyz/geoserver/wms</a> &lt;<a href="http://myownhomepage.xyz:80/geoserver/wms">http://myownhomepage.xyz:80/geoserver/wms</a>&gt;", params, this, setHTML, setHTML);<br><br>And since your OL is on the same server as your GS, you could even do this:<br><br> &nbsp;&nbsp;&nbsp;OpenLayers.loadURL("/geoserver/wms &lt;<a href="http://myownhomepage.xyz:80/geoserver/wms">http://myownhomepage.xyz:80/geoserver/wms</a>&gt;", params, this, setHTML, setHTML);<br><br>And to deal with errors in your AJAX request, why not use a separate function like this:<br><br> &nbsp;&nbsp;&nbsp;OpenLayers.loadURL("/geoserver/wms &lt;<a href="http://myownhomepage.xyz:80/geoserver/wms">http://myownhomepage.xyz:80/geoserver/wms</a>&gt;", params, this, setHTML, *onAjaxError*);<br><br>Regards, Roald<br><br>On 10/05/10 05:45, boxplot wrote:<br><blockquote type="cite">Hi,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">maybe a made a small progress. As I have written in my last mail I get no response when using GetFeatureInfo (I do get a response when using the GeoServer OpenLayers example which I can access through "Layer Preview" =&gt; see code below). So I copied both requests directly into my browser and both got a response:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://myownhomepage.xyz/geoserver/wms?REQUEST=GetFeatureInfo&amp;EXCEPTIONS=application%2Fvnd.ogc.se_xml&amp;BBOX=12.327023%2C47.673%2C12.362977%2C47.777&amp;X=79&amp;Y=375&amp;INFO_FORMAT=text%2Fhtml&amp;QUERY_LAYERS=Workspace%3ALayer&amp;FEATURE_COUNT=50&amp;Srs=EPSG%3A4326&amp;Layers=Workspace%3ALayer&amp;Styles=&amp;WIDTH=177&amp;HEIGHT=512&amp;format=image%2Fpng">http://myownhomepage.xyz/geoserver/wms?REQUEST=GetFeatureInfo&amp;EXCEPTIONS=application%2Fvnd.ogc.se_xml&amp;BBOX=12.327023%2C47.673%2C12.362977%2C47.777&amp;X=79&amp;Y=375&amp;INFO_FORMAT=text%2Fhtml&amp;QUERY_LAYERS=Workspace%3ALayer&amp;FEATURE_COUNT=50&amp;Srs=EPSG%3A4326&amp;Layers=Workspace%3ALayer&amp;Styles=&amp;WIDTH=177&amp;HEIGHT=512&amp;format=image%2Fpng</a> &lt;<a href="http://myownhomepage.xyz/geoserver/wms?REQUEST=GetFeatureInfo&amp;EXCEPTIONS=application%2Fvnd.ogc.se_xml&amp;BBOX=12.327023%2C47.673%2C12.362977%2C47.777&amp;X=79&amp;Y=375&amp;INFO_FORMAT=text%2Fhtml&amp;QUERY_LAYERS=Workspace%3ALayer&amp;FEATURE_COUNT=50&amp;Srs=EPSG%3A4326&amp;Layers=Workspace%3ALayer&amp;Styles=&amp;WIDTH=177&amp;HEIGHT=512&amp;format=image%2Fpng">http://myownhomepage.xyz/geoserver/wms?REQUEST=GetFeatureInfo&amp;EXCEPTIONS=application%2Fvnd.ogc.se_xml&amp;BBOX=12.327023%2C47.673%2C12.362977%2C47.777&amp;X=79&amp;Y=375&amp;INFO_FORMAT=text%2Fhtml&amp;QUERY_LAYERS=Workspace%3ALayer&amp;FEATURE_COUNT=50&amp;Srs=EPSG%3A4326&amp;Layers=Workspace%3ALayer&amp;Styles=&amp;WIDTH=177&amp;HEIGHT=512&amp;format=image%2Fpng</a>&gt;<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">GeoServer runs as a .war within Tomcat and OpenLayers is on the same server. I really can't believe why the same code with the same request on the same server is once getting a response and the other time it is not. Is there a possibility that it is a proxy-issue or maybe a problem with the encoding?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks, Pascal</blockquote></div></blockquote></div></div></body></html>