<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=937392917-10032008><FONT face=Arial
color=#0000ff size=2>Hi E,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=937392917-10032008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=937392917-10032008><FONT face=Arial
color=#0000ff size=2>try OpenLayers.ProxyHost = "<A
href="http://[yourserver]/cgi-bin/proxy_openlayers.cgi?url">http://[yourserver]/cgi-bin/proxy_openlayers.cgi?url</A>=";,
but with your proxy-script.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=937392917-10032008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=937392917-10032008><FONT face=Arial
color=#0000ff size=2>Arnd</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=937392917-10032008></SPAN> </DIV>
<DIV dir=ltr align=left>
<HR tabIndex=-1>
</DIV>
<DIV dir=ltr align=left><FONT face=Tahoma size=2><B>Von:</B>
edel.banks@gmail.com [mailto:edel.banks@gmail.com] <B>Im Auftrag von </B>Edel
Banks<BR><B>Gesendet:</B> Sonntag, 9. März 2008 23:36<BR><B>An:</B> Arnd
Wippermann; users@openlayers.org<BR><B>Betreff:</B> Re: [OpenLayers-Users]
Nodelist Info not working<BR></FONT><BR></DIV>
<DIV></DIV>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="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">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></BODY></HTML>