<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-15">
<META content="MSHTML 6.00.2900.3243" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px">
<DIV>Hi Emmanuel</DIV>
<DIV> </DIV>
<DIV>OK - here is some code from an application we have developed:</DIV>
<DIV> </DIV>
<DIV>Here is the code for clicking on a map and getting a response:</DIV>
<DIV> </DIV>
<DIV>map.events.register('click', map, function (e) {<BR> var xys = map.getLonLatFromViewPortPx(e.xy);<BR> easting = xys.lon;<BR> northing = xys.lat;<BR> OpenLayers.Util.getElement('coords').innerHTML = "<strong>x:</strong>" + parseInt(easting) + " <strong>y:</strong>" + parseInt(northing);<BR> //added 12th Feb<BR> var tempgeom = new OpenLayers.Geometry.Point(easting,northing);<BR> //now re-projection to WGS84<BR> var src = new OpenLayers.Projection('EPSG:2193');<BR> var dest = new OpenLayers.Projection('EPSG:4326'); <BR> OpenLayers.Projection.transform(tempgeom, src, dest); <BR> longitude = tempgeom.x;<BR> latitude = tempgeom.y;<BR> var bbox1 = easting - 10;<BR> var bbox2 = northing - 10;<BR> var bbox3 = easting + 10;<BR> var bbox4 = northing + 10;<BR> if ((mode == "qry") || (mode == "allocate") || (mode == "deallocate")) {<BR> var parcel = "<A href="http://esri-arcims/wmsconnector/com.esri.wms.Esrimap?servicename=sansonr_crs&version=1.1.1&request=GetFeatureInfo&QUERY_LAYERS=2&INFO_FORMAT=text/plain&SRS=EPSG:2193&BBOX">http://esri-arcims/wmsconnector/com.esri.wms.Esrimap?servicename=sansonr_crs&version=1.1.1&request=GetFeatureInfo&QUERY_LAYERS=2&INFO_FORMAT=text/plain&SRS=EPSG:2193&BBOX</A>=" + bbox1 + "," + bbox2 + "," + bbox3 + "," + bbox4 + "&WIDTH=20&HEIGHT=20&X=10&Y=10";<BR> OpenLayers.loadURL(parcel, '', this, setHTML1);<BR> }<BR> else if ((mode == "mainhome") || (mode == "maingate") || (mode == "farmpts")) {<BR> var gfi2 = "<A href="http://esri-arcims/wmsconnector/com.esri.wms.Esrimap?servicename=sansonr_fp_vw&version=1.1.1&request=GetFeatureInfo&QUERY_LAYERS=0&FEATURE_COUNT=10&INFO_FORMAT=text/plain&SRS=EPSG:2193&BBOX">http://esri-arcims/wmsconnector/com.esri.wms.Esrimap?servicename=sansonr_fp_vw&version=1.1.1&request=GetFeatureInfo&QUERY_LAYERS=0&FEATURE_COUNT=10&INFO_FORMAT=text/plain&SRS=EPSG:2193&BBOX</A>=" + bbox1 + "," + bbox2 + "," + bbox3 + "," + bbox4 + "&WIDTH=20&HEIGHT=20&X=10&Y=10";<BR> OpenLayers.loadURL(gfi2, '', this, chkfarm);<BR> }<BR> var regc = "<A href="http://10.64.20.120/cgi-bin/gsswms.exe?service=WMS&version=1.1.1&request=GetFeatureInfo&LAYERS=regions&QUERY_LAYERS=regions&INFO_FORMAT=text/plain&SRS=EPSG:2193&BBOX">http://10.64.20.120/cgi-bin/gsswms.exe?service=WMS&version=1.1.1&request=GetFeatureInfo&LAYERS=regions&QUERY_LAYERS=regions&INFO_FORMAT=text/plain&SRS=EPSG:2193&BBOX</A>=" + bbox1 + "," + bbox2 + "," + bbox3 + "," + bbox4 + "&WIDTH=20&HEIGHT=20&X=10&Y=10";<BR> OpenLayers.loadURL(regc, '', this, setHTML2);<BR> Event.stop(e);<BR> });<BR></DIV>
<DIV> </DIV>
<DIV>//Then we have a function setHTML1:</DIV>
<DIV> </DIV>
<DIV>function setHTML1(response1) {<BR> var par = "";<BR> if(response1.responseText.length >= 1) {<BR> var lines = response1.responseText.split('\n');<BR> var pardat = lines[1].replace(/^"/,'').replace(/"$/,'').split('" "');<BR> var parno = pardat[14];<BR> if (parno >= 1) {<BR> dummyDate = new Date() ;<BR> dummyParameter = dummyDate.getTime();<BR> if(mode=="qry") {<BR> var fdat = window.open('http://searchagribase.asurequality.com/agribasemapdata/indexpage.cfm?mode=qry&par=' + parno + '&dataset=complete',<BR> "_blank","height=480,width=850,status=no,scrollbars=yes,toolbar=no,menubar=no,location=no");<BR> }<BR> else if(mode=="allocate"){<BR> if(farmid>="A"){<BR> falloc = 'http://searchagribase.asurequality.com/agribasemapdata/indexpage.cfm?mode=allocate&par=' + parno + '&farmid=' + farmid + '&dataset=farm';<BR> OpenLayers.Util.getElement('ifrm').src = falloc;<BR> }<BR> else if(val>="0"){<BR> valloc = 'http://searchagribase.asurequality.com/agribasemapdata/indexpage.cfm?mode=allocate&par=' + parno + '&val=' + val + '&dataset=val&time=' + dummyParameter;<BR> OpenLayers.Util.getElement('ifrm').src = valloc;<BR> }<BR> }<BR> else if(mode=="deallocate"){<BR> if(farmid>="A"){<BR> fdeall = 'http://searchagribase.asurequality.com/agribasemapdata/indexpage.cfm?mode=deallocate&par=' + parno + '&farmid=' + farmid + '&dataset=farm&time=' + dummyParameter;<BR> OpenLayers.Util.getElement('ifrm').src = fdeall;<BR> }<BR> else if(val>="0"){<BR> vdeall = 'http://searchagribase.asurequality.com/agribasemapdata/indexpage.cfm?mode=deallocate&par=' + parno + '&val=' + val + '&dataset=val&time=' + dummyParameter;<BR> OpenLayers.Util.getElement('ifrm').src = vdeall;<BR> }<BR> }<BR> }<BR> else {<BR> OpenLayers.Util.getElement('ifrm').src = "nothing.html";<BR> alert("Nothing found!");<BR> }<BR> }<BR> }</DIV>
<DIV> </DIV>
<DIV>//In the HTML section of our page we have an iframe specified which sits below the map div:</DIV>
<DIV><div id="map" style="position:absolute;top:90px;left:2px;width:512px"></div></DIV>
<DIV><iframe id="ifrm" name="ifrm" scrolling="auto" style="position:absolute;top:620px;left:0px;width:512px;margin-left:0px;margin-top:0px" frameborder="0"></iframe></DIV>
<DIV> </DIV>
<DIV>regards,</DIV>
<DIV> </DIV>
<DIV>Robert S</DIV>
<DIV> </DIV>
<DIV><BR>>>> maning sambale <emmanuel.sambale@gmail.com> 5/10/2009 10:22 p.m. >>><BR>Thanks! Any example openlayers page I can work on?<BR>I know have a single html with anchors. When a user clicks on the<BR>link from the kml it should embed the html below the map going to the<BR>anchored link.<BR></DIV><br><br><table bgcolor=white style="color:black"><tr><td><br>------------------------------------------------------------------<br>
The contents of this email are confidential to AsureQuality. If you have received this communication in error please notify the sender immediately and delete the message and any attachments. The opinions expressed in this email are not necessarily those of AsureQuality. This message has been scanned for known viruses before delivery. AsureQuality supports the Unsolicited Electronic Messages Act 2007. If you do not wish to receive similar communications in future, please notify the sender of this message.<br>
------------------------------------------------------------------</td></tr></table><br><br>
<P align=center><FONT style="BACKGROUND-COLOR: #ffffff">This message has been scanned for malware by SurfControl plc. </FONT><A href="http://www.surfcontrol.com/"><FONT style="BACKGROUND-COLOR: #ffffff" color=#000000>www.surfcontrol.com</FONT></A></P>
</body></HTML>