Arnd, <br><br>window.open works like a charm, thank you.<br><br>Its a bit awkward for what Im trying to do though.<br><br>How or where would I declare a proxy script? One is already being used somewhere can I just point my code to it? so I can use loadURL and have the map and feature info on the same page.<br>
<br>Thanks again<br>E<br><br><div><span class="gmail_quote">On 09/03/2008, <b class="gmail_sendername">Arnd Wippermann</b> <<a href="mailto:arnd.wippermann@web.de">arnd.wippermann@web.de</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br> <br> when you use OpenLayers.loadURL(url, '', this, setHTML, setHTML), you have<br> to declare a proxy-script. loadURL uses Ajax to the get the filecontents to<br> display it in your page. You can use window.open(url, "GetFeatureInfo). It<br>
 opens a new window, but you need no proxy.<br> <br><br> Mit freundlichen Grüssen<br> <br> Arnd Wippermann<br> <a href="http://gis.ibbeck.de/">http://gis.ibbeck.de/</a><br> <br> <br> <br> <br> <br> <br>________________________________<br>
 <br> Von: <a href="mailto:osgisfyp@gmail.com">osgisfyp@gmail.com</a> [mailto:<a href="mailto:osgisfyp@gmail.com">osgisfyp@gmail.com</a>]<br> Gesendet: Sonntag, 9. März 2008 19:57<br> An: <a href="mailto:arnd.wippermann@web.de">arnd.wippermann@web.de</a>; <a href="mailto:users@openlayers.org">users@openlayers.org</a><br>
 <br>Betreff: Re: [OpenLayers-Users] Nodelist Info not working<br> <br> <br> Just to clarify the "Or I have to do something other then create the<br> directory, put the files in it and go?" the statements I made earlier.<br>
 <br> I used the geoserver gui to create a namespace, datastore and feature types.<br> All the created feature maps were available in MapPreview and all worked<br> fine.  It just seems that when I call the layers from elsewhere then the get<br>
 feature info function stops working.<br> <br> I think I'm missing a configuration step or something.<br> <br> Heres the html code Im using:<br> <br> geoserver/data_dir/my_project_dir/myfile.html<br> <br> <br> <?xml version="1.0" encoding="UTF-8"?><br>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"<br> "DTD/xhtml1-strict.dtd"><br> <html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>"><br>
        <head><br>        <title>Pedestrian Route Finder</title><br>        <style type="text/css"><br>            #map {<br>                width: 500px;<br>                height: 338px;<br>
                border: 1px solid black;<br>            }<br>            #wrapper {<br>                width: 500px;<br>            }<br>            #location {<br>                float: right;<br>            }<br>        </style><br>
        <script<br> src="<a href="http://localhost:8080/geoserver/openlayers/OpenLayers.js">http://localhost:8080/geoserver/openlayers/OpenLayers.js</a>"<br> type="text/javascript"><br>        </script><br>
        <script defer="defer" type="text/javascript"><br> <br>        var map;<br>        var roads;<br>        var busLines;<br>        var luasLines;<br>        var luasStops;<br> <br> <br>        function setHTML(response) {<br>
            document.getElementById('nodelist').innerHTML =<br> response.responseText;<br>        };<br> <br>        OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;<br>        OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;<br> <br>
        function init(){<br> <br> <br>            var bounds = new OpenLayers.Bounds(<br> <br>                305097.5401555448, 226935.368699667,        // left, bottom<br>                318253.033844963, 237653.04983245343        // right, top<br>
 <br>            );<br> <br> <br>            var options = {<br>                controls: [],<br>                maxExtent: bounds,<br>                maxResolution: 39.6698972242898,<br>                projection: "EPSG:29900",<br>
                units: 'm'<br>            };<br> <br> <br>            map = new OpenLayers.Map('map', options);<br> <br> <br> <br> <br>            // setup single layer<br>            roads = new OpenLayers.Layer.WMS(<br>
                "pedestrianRouteFinder:required_roads - Untiled",<br> "<a href="http://localhost:8080/geoserver/wms">http://localhost:8080/geoserver/wms</a>",<br>                {<br>                    height: '652',<br>
                    width: '800',<br>                    layers: 'pedestrianRouteFinder:required_roads',<br>                    styles: 'required_roads_style',<br>                    srs: 'EPSG:29900',<br>
                    format: 'image/png'<br>                },<br>                {isBaseLayer:true},<br>                {singleTile: true}<br>            );<br> <br> <br>            // setup single untiled layer<br>
            busLines = new OpenLayers.Layer.WMS(<br>                "pedestrianRouteFinder:bus_lines - Untiled",<br> "<a href="http://localhost:8080/geoserver/wms">http://localhost:8080/geoserver/wms</a>",<br>
                {<br>                    height: '652',<br>                    width: '800',<br>                    layers: 'pedestrianRouteFinder:bus_lines',<br>                    srs: 'EPSG:29900',<br>
                    format: 'image/png',<br>                    transparent:true<br>                },<br>                {isBaseLayer:false, opacity:1},<br>                {singleTile: true}<br>            );<br>
 <br> <br> <br>            // setup single untiled layer<br>            luasLines = new OpenLayers.Layer.WMS(<br>                "pedestrianRouteFinder:luas_lines - Untiled",<br> "<a href="http://localhost:8080/geoserver/wms">http://localhost:8080/geoserver/wms</a>",<br>
                {<br>                    height: '652',<br>                    width: '800',<br>                    layers: 'pedestrianRouteFinder:luas_lines',<br>                    srs: 'EPSG:29900',<br>
                    format: 'image/png',<br>                    transparent:true<br>                },<br>                {isBaseLayer:false, opacity:1},<br>                {singleTile: true}<br>            );<br>
 <br> <br> <br>            // setup single untiled layer<br>            luasStops = new OpenLayers.Layer.WMS(<br>                "pedestrianRouteFinder:luas_stops_snapped - Untiled",<br> "<a href="http://localhost:8080/geoserver/wms">http://localhost:8080/geoserver/wms</a>",<br>
                {<br>                    height: '652',<br>                    width: '800',<br>                    layers: 'pedestrianRouteFinder:luas_stops_snapped',<br>                    srs: 'EPSG:29900',<br>
                    format: 'image/png',<br>                    transparent:true<br>                },<br>                {isBaseLayer:false, opacity:1},<br>                {singleTile: true}<br>            );<br>
 <br> <br>            map.addLayers([roads, busLines, luasLines, luasStops]);<br> <br>            // setup controls and initial zooms<br>            map.addControl(new OpenLayers.Control.PanZoomBar());<br>            map.addControl(new OpenLayers.Control.Navigation());<br>
            map.addControl(new OpenLayers.Control.Scale($('scale')));<br>            map.addControl(new OpenLayers.Control.MousePosition({element:<br> $('location')}));<br>            map.addControl(new OpenLayers.Control.LayerSwitcher());<br>
 <br> <br>            map.zoomToExtent(bounds);<br> <br> <br> <br>            // support GetFeatureInfo<br>            map.events.register('click', map, function (e) {<br>                document.getElementById('nodelist').innerHTML = "Loading...<br>
 please wait...";<br>                var url =  map.layers[0].getFullRequestString(<br>                    {<br>                        REQUEST: "GetFeatureInfo",<br>                        EXCEPTIONS: "application/vnd.ogc.se_xml",<br>
                        BBOX: map.getExtent().toBBOX(),<br>                        X: e.xy.x,<br>                        Y: e.xy.y,<br>                        INFO_FORMAT: 'text/html',<br>                        QUERY_LAYERS: map.layers[0].params.LAYERS,<br>
                        FEATURE_COUNT: 50,<br>                        WIDTH: map.size.w,<br>                        HEIGHT: map.size.h<br>                    },<br>                    "<a href="http://localhost:8080/geoserver/wms">http://localhost:8080/geoserver/wms</a>"<br>
                );<br>                OpenLayers.loadURL(url, '', this, setHTML, setHTML);<br>                OpenLayers.Event.stop(e);<br>            });<br>        }<br>        </script><br> <br>    </head><br>
    <body onload="init()"><br>        <div id="map"></div><br>        <div id="wrapper"><br>            <div id="location"></div><br>            <div id="scale"></div><br>
        </div><br>        <div id="nodelist">Click on the map to get feature info</div><br> <br>    </body><br> </html><br> <br> <br> <br> Thanks for the help<br> <br> <br> <br> <br>
 On 09/03/2008, Edel Banks <<a href="mailto:edel.banks@gmail.com">edel.banks@gmail.com</a>> wrote:<br> <br> <br> <br>        ---------- Forwarded message ----------<br>        From: Edel Banks <<a href="mailto:edel.banks@gmail.com">edel.banks@gmail.com</a>><br>
        Date: 9 Mar 2008 18:12<br>        Subject: Re: [OpenLayers-Users] Nodelist Info not working<br>        To: Arnd Wippermann <<a href="mailto:arnd.wippermann@web.de">arnd.wippermann@web.de</a>>, <a href="mailto:users@openlayers.org">users@openlayers.org</a><br>
 <br>        Arnd thanks for the reply, tried using<br> map.layers[2].getFullRequestString and map.layers[2].params.LAYERS as you<br> suggested but still get "Loading... please wait..."<br> <br>        I have an idea of what the problem is but not how to fix it.<br>
 <br>        I copied the source code from the openlayers tiger-ny example saved<br> it as my own html file in my project directory in data_dir/.  My intention<br> was to make one change at a time to see if, when the get feature info<br>
 function would stop working to identify the issue.  But the first time I<br> opened the file without any changes it didn't work, the "Loading... please<br> wait..." message was displayed when a feature is clicked.<br>
 <br>        Also, when the original tiger-ny is being called the url has a lot<br> of information in it:<br> <br> <a href="http://localhost:8080/geoserver/wms?bbox=-74.047185,40.679648,-73.907005,40">http://localhost:8080/geoserver/wms?bbox=-74.047185,40.679648,-73.907005,40</a>.<br>
 882078&styles=&Format=application/openlayers&request=GetMap&layers=tiger-ny&<br> width=431&height=550&srs=EPSG:4326<br> <br>        I recognise all of this information, since some of it is specified<br>
 in the html page<br> <br>        The url is the only thing that is different. Is their something that<br> needs to be added to the copied code to get the wms query working?<br> <br>        Or maybe my project directory structure in geoserver is incorrect?<br>
        geoserver/data_dir/project_dir/copied_tiger-ty.html<br> <br>        Or I have to do something other then create the directory, put the<br> files in it and go?<br> <br>        Thanks<br>        E<br> <br> <br> <br>
 <br>        On 09/03/2008, Arnd Wippermann <<a href="mailto:arnd.wippermann@web.de">arnd.wippermann@web.de</a>> wrote:<br> <br>                Hi,<br> <br>                $('layers')<br>                map.layers[0] is not the layer of the query. Try it with<br>
 map.layers[2].<br> <br>                map.layers[2].getFullRequestString<br>                map.layers[2].params.LAYERS<br> <br>                Mit freundlichen Grüssen<br> <br>                Arnd Wippermann<br>                <a href="http://gis.ibbeck.de/">http://gis.ibbeck.de/</a><br>
 <br> <br> <br>                -----Ursprüngliche Nachricht-----<br>                Von: <a href="mailto:users-bounces@openlayers.org">users-bounces@openlayers.org</a><br> [mailto:<a href="mailto:users-bounces@openlayers.org">users-bounces@openlayers.org</a>] Im<br>
                Auftrag von osgis<br>                Gesendet: Sonntag, 9. März 2008 15:50<br>                An: <a href="mailto:users@openlayers.org">users@openlayers.org</a><br>                Betreff: Re: [OpenLayers-Users] Nodelist Info not working<br>
 <br> <br> <br>                Hi Chris1211,<br> <br>                I'm having the same problem.  I've tried changing the<br> <br>                var url =  map.layers[0].getFullRequestString(<br>                ...<br>
                QUERY_LAYERS: map.layers[0].params.LAYERS,<br> <br>                To:<br>                var url =  map.layers[$('layers')].getFullRequestString(<br>                ...<br>                QUERY_LAYERS: map.layers[$('layers')].params.LAYERS,<br>
 <br>                And:<br>                var url =  map.layers[$('layer')].getFullRequestString(<br>                ...<br>                QUERY_LAYERS: map.layers[$('layer')].params.LAYERS,<br> <br> <br>
                Still no joy :(<br> <br>                If anyone has any suggestions they'd be much appreciated.<br> <br> <br>                chris1211 wrote:<br>                ><br>                > I am trying to get the feature info from my map that has<br>
 multi layers<br>                > and uses the layer switcher but all i get it a please wait<br> the layer i<br>                > need to quarry is the Panels layer can some one please<br> help. thanks<br>                > function init(){  var bounds = new<br>
                ><br> OpenLayers.Bounds(-88.55546395,36.1137137,-87.98201304999999,36.5199723);<br> <br>                >  map = new OpenLayers.Map('map', { controls: [] });<br>                >               map.addControl(new<br>
 OpenLayers.Control.PanZoomBar());<br>                >               map.addControl(new<br> OpenLayers.Control.MouseToolbar());<br>                ><br>                ><br>                >           // support GetFeatureInfo<br>
                >           map.events.register('click', map, function (e) {<br>                ><br> OpenLayers.Util.getElement('nodelist').innerHTML = "Loading...<br>                > please wait...";<br>
                >             var url =<br> map.layers[0].getFullRequestString({<br>                >                             REQUEST: "GetFeatureInfo",<br>                >                             EXCEPTIONS:<br>
 "application/vnd.ogc.se_xml",<br>                >                             BBOX:<br> map.getExtent().toBBOX(),<br>                >                             X: e.xy.x,<br>                >                             Y: e.xy.y,<br>
                >                             INFO_FORMAT: 'text/html',<br>                >                             QUERY_LAYERS:<br> map.layers[0].params.LAYERS,<br>                >                             FEATURE_COUNT: 50,<br>
                >                             layers: 'Panels',<br>                >                             styles: '',<br>                >                             srs: 'EPSG:4326',<br>
                >                             WIDTH: map.size.w,<br>                >                             HEIGHT: map.size.h},<br>                ><br>                ><br> "<a href="http://hazards.fema.gov/wmsconnector/wmsconnector/Servlet/flood">http://hazards.fema.gov/wmsconnector/wmsconnector/Servlet/flood</a>"<br>
                >                             );<br>                >             OpenLayers.loadURL(url, '', this, setHTML,<br> setHTML);<br>                >             Event.stop(e);<br>                >       });<br>
                ><br>                ><br>                >             map.addControl(new<br>                ><br> OpenLayers.Control.LayerSwitcher({'div':OpenLayers.Util.getElement('la<br>                > yerswitcher')}));<br>
                ><br>                >           var hctiger_wms = new OpenLayers.Layer.WMS(<br> "OpenLayers WMS",<br>                >                 "<a href="http://13.0.0.150:8080/geoserver/wms">http://13.0.0.150:8080/geoserver/wms</a>",<br>
                >                 {layers: 'District 9 Homeland'},<br>                > {'displayInLayerSwitcher':false} );<br>                ><br>                >             var zone_wms = new OpenLayers.Layer.WMS( "FEMA<br>
 Flood<br>                > Zones",<br>                ><br>                ><br> "<a href="http://hazards.fema.gov/wmsconnector/wmsconnector/Servlet/flood">http://hazards.fema.gov/wmsconnector/wmsconnector/Servlet/flood</a>",<br>
                >                 {layers: "Flood_Hazard_Zones",<br> transparent: "true",<br>                > format: "image/png" });<br>                >      map.addLayer(zone_wms);<br>
                ><br>                >             var panels_wms = new OpenLayers.Layer.WMS(<br> "FEMA DFIRM<br>                > Panels",<br>                ><br>                ><br> "<a href="http://hazards.fema.gov/wmsconnector/wmsconnector/Servlet/flood">http://hazards.fema.gov/wmsconnector/wmsconnector/Servlet/flood</a>",<br>
                >                 {layers: "Panels", transparent: "true",<br> format:<br>                > "image/png" });<br>                ><br>                >           var precip_wms = new OpenLayers.Layer.WMS(<br>
 "Total Storm<br>                > Precip",<br>                ><br>                ><br> "<a href="http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/ntp.cgi?">http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/ntp.cgi?</a>",<br>
                >                 {layers: "nexrad_stormtotal_precip",<br> transparent:<br>                > "true",<br>                > format: "image/png" },<br>                >               {isBaseLayer: false, opacity: 0.5});<br>
                ><br>                >               map.addLayer(precip_wms);<br>                ><br>                >        var nexrad_wms = new OpenLayers.Layer.WMS( "Current<br> Nexrad Radar",<br>
                ><br>                ><br> "<a href="http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi?">http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi?</a>",<br>                >                 {layers: "nexrad-n0r-m05min", transparent:<br>
 "true", format:<br>                > "image/png" },<br>                >               {isBaseLayer: false, opacity: 0.5});<br>                ><br>                >               map.addLayer(nexrad_wms);<br>
                ><br>                >        var polywarn_wms = new OpenLayers.Layer.WMS( "NWS<br> Polygon<br>                Warnings",<br>                ><br>                ><br> "<a href="http://mesonet.agron.iastate.edu/cgi-bin/wms/us/wwa.cgi?">http://mesonet.agron.iastate.edu/cgi-bin/wms/us/wwa.cgi?</a>",<br>
                >                 {layers: "warnings_p", transparent:<br> "true", format:<br>                > "image/png" });<br>                ><br>                >         map.addLayer(polywarn_wms);<br>
                ><br>                >   var zone = new OpenLayers.Layer.GML("Alert Zone Area",<br> "zone.kml",<br>                > {format: OpenLayers.Format.KML});<br>                > map.addLayer(zone)<br>
                ><br>                >       zone_wms.setVisibility(true);<br>                >         panels_wms.setVisibility(false);<br>                >       precip_wms.setVisibility(false);<br>                >       nexrad_wms.setVisibility(false);<br>
                >       zone.setVisibility(true);<br>                ><br>                > map.addLayers([hctiger_wms, zone_wms,<br>                > panels_wms,precip_wms,nexrad_wms,polywarn_wms,zone]);<br>                > map.setCenter(new OpenLayers.LonLat(-88.328666,36.301788),<br>
 11);<br>                ><br>                >         }<br>                >     </script><br>                > <title>Henry Co. EMA</title></head><br>                > <body onLoad="init()"><br>
                >   <h3 class="style2">Henry County EMA - Map Services<br> Server </h3><br>                >   <div id="layerswitcher" style="float:top; width:<br> 20em;"></div><br>
                >     <div id="map"></div><br>                >     <div id="docs"><br>                >       <p>Info and Desc.</p><br>                >     </div><br>
                >  <div id="nodelist">Click on the map to get feature<br> infos</div><br>                > </body> </html><br>                ><br> <br>                --<br>                View this message in context:<br>
 <br> <a href="http://www.nabble.com/Nodelist-Info-not-working-tp14975579p15933774.html">http://www.nabble.com/Nodelist-Info-not-working-tp14975579p15933774.html</a><br>                Sent from the OpenLayers Users mailing list archive at<br>
 <a href="http://Nabble.com">Nabble.com</a>.<br> <br>                _______________________________________________<br>                Users mailing list<br>                <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
                <a href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a><br> <br> <br> <br> <br> <br> <br> </blockquote></div><br>