<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Hi,<br><br>only thing I´ve noticed fast scanning through your code:<br>have you tried setting layer1.map.size.w instead of map.size.w?<br>And have you tried changing INFO_FORMAT?<br><br>best regards<br>Sarah<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">Von:</span></b> sunny74 <sb.ray@hotmail.com><br><b><span style="font-weight: bold;">An:</span></b> users@openlayers.org<br><b><span style="font-weight: bold;">Gesendet:</span></b> Dienstag, den 30. März 2010, 8:22:20 Uhr<br><b><span style="font-weight: bold;">Betreff:</span></b> [OpenLayers-Users] Opemlayers.loadURL() does not work in
GetFeatureInfo<br></font><br><br>Dear Friends,<br><br> OpenLayers.loadUrl(url, '', this, setHTML);<br>does not work when I do a GetFeatureInfo call in an aspx page.<br><br>It says Jscript does not support this object or property.<br>My map file is Ok as I get to see the map properly.<br>Does anybody know how to solve this problem.<br><br>My code in aspx page is:<br><br><%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"<br>Inherits="_Default" %><br><br><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"<br>"<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>"><br><br><html xmlns="<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>"><br><head id="Head1" runat="server"><br> <title></title><br> <script
type="text/javascript"<br>src="OL28/OL28/lib/OpenLayers.js"></script><br> <script type="text/javascript"><br> var mapview, layer, layer1, map;<br><br> function init2() {<br> <br><br> }<br><br> <br> <br> <br> <br> <br> <br> <br> </script><br></head><br><body><br> <form id="form1" runat="server"><br> <div id="map" runat="server" style="width:600px;height:600px"><br> <script defer="defer" type="text/javascript"><br> OpenLayers.ProxyHost =<br>"<a href="http://172.16.0.144:9000/cgi-bin/proxy.cgi?url=" target="_blank" >http://172.16.0.144:9000/cgi-bin/proxy.cgi?url=</a>";<br> //alert('here');<br>
var lon = 73.25;<br> var lat = 20.35;<br> var zoom = 6;<br> map = new OpenLayers.Map('<%=map.ClientID%>');<br> // layer = new OpenLayers.Layer.WMS("OpenLayers WMS",<br> // "<a href="http://localhost:9000/cgi-bin/mapserv.exe" target="_blank">http://localhost:9000/cgi-bin/mapserv.exe</a>?", {<br>map: '../htdocs/Shape/newwr1rec.map', layers: 'STATE', format: 'png' });<br> // layer1 = new OpenLayers.Layer.WMS("Rstations",<br> // "<a href="http://localhost:9000/cgi-bin/mapserv.exe" target="_blank">http://localhost:9000/cgi-bin/mapserv.exe</a>?", {<br>map:
'../htdocs/Shape/newwr1rec.map', transparent: true, layers:<br>'RailwayStations', format: 'png' });<br> //alert(map);<br> layer = new OpenLayers.Layer.WMS("OpenLayers WMS",<br>"<a href="http://172.16.0.144:9000/cgi-bin/mapserv.exe?map=d:/ms4w/apache/htdocs/Shape/newwr1rec.map" target="_blank" >http://172.16.0.144:9000/cgi-bin/mapserv.exe?map=d:/ms4w/apache/htdocs/Shape/newwr1rec.map</a>",<br>{ 'layers': 'STATE', transparent: false, format: "image/png" });<br> layer1 = new OpenLayers.Layer.WMS("OpenLayers WMS",<br>"<a href="http://172.16.0.144:9000/cgi-bin/mapserv.exe?map=d:/ms4w/apache/htdocs/Shape/newwr1rec.map" target="_blank" >http://172.16.0.144:9000/cgi-bin/mapserv.exe?map=d:/ms4w/apache/htdocs/Shape/newwr1rec.map</a>",<br>{ 'layers': 'RailwayStations', transparent: true, format: "image/png" });<br> //alert(layer);<br>
map.addLayers([layer, layer1]);<br><br> //layer = new OpenLayers.Layer.WFS("OpenLayers WFS",<br>"<a href="http://127.0.0.1:9000/cgi-bin/mapserv.exe?map=d:/ms4w/apache/htdocs/Shape/newwr1.map" target="_blank" >http://127.0.0.1:9000/cgi-bin/mapserv.exe?map=d:/ms4w/apache/htdocs/Shape/newwr1.map</a>",<br>{ typename: 'STATE', maxfeatures: 6 }, { featureClass:<br>OpenLayers.Feature.WFS });<br><br> ///map.addLayer(layer);<br><br><br> map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);<br> map.addControl(new OpenLayers.Control.LayerSwitcher());<br> //map.zoomToMaxExtent();<br> map.events.register('click', map, function(e) {<br> //alert('clicked');<br> OpenLayers.Util.getElement('nodeList').innerHTML =
"Loading...<br>please wait...";<br> var url = layer1.getFullRequestString({<br> REQUEST: "GetFeatureInfo",<br> EXCEPTIONS: "application/vnd.ogc.se_xml",<br> BBOX: layer1.map.getExtent().toBBOX(),<br> X: e.xy.x,<br> Y: e.xy.y,<br> INFO_FORMAT: 'text/html',<br> QUERY_LAYERS: layer1.params.LAYERS,<br> <br> FEATURE_COUNT: 1,<br> WIDTH: map.size.w,<br>
HEIGHT: map.size.h<br> });<br> // var msg = document.getElementById('urlmsg');<br> // msg.value = url;<br> alert(url, "getfeatureinfo",<br>"location=0,status=0,scrollbars=1,width=800,height=400");<br> //window.open(url, '', this, setHTML, setHTML);<br> OpenLayers.loadUrl(url, '', this, setHTML);<br> OpenLayers.Event.stop(e);<br> });<br><br><br> function setHTML(response) {<br> OpenLayers.Util.getElement('nodeList').innerHTML =<br>response.responseText;<br> }<br> <br> <br> <br>
<br> </script><br> </div><br> <div id="nodelist"><br> <br> </div><br> </form><br></body><br></html><br><br><br><br>Thanks for attention and efforts.<br>-- <br>View this message in context: <a href="http://n2.nabble.com/Opemlayers-loadURL-does-not-work-in-GetFeatureInfo-tp4822969p4822969.html" target="_blank">http://n2.nabble.com/Opemlayers-loadURL-does-not-work-in-GetFeatureInfo-tp4822969p4822969.html</a><br>Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>_______________________________________________<br>Users mailing list<br><a ymailto="mailto:Users@openlayers.org" href="mailto:Users@openlayers.org">Users@openlayers.org</a><br><a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br></div></div>
</div><br>__________________________________________________<br>Do You Yahoo!?<br>Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. <br>http://mail.yahoo.com </body></html>