<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>Trouble getting feature info</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<BR>
<BR>

<P><FONT SIZE=2 FACE="Arial">I am building a small application using a couple of WMS layers.&nbsp; I want to include a feature info tool.&nbsp; I copied much of the code from the example page, </FONT><A HREF="http://openlayers.org/dev/examples/getfeatureinfo-control.html"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://openlayers.org/dev/examples/getfeatureinfo-control.html</FONT></U></A><FONT SIZE=2 FACE="Arial"> .&nbsp; Without the line of code, </FONT><FONT COLOR="#000000" SIZE=2 FACE="Arial">infoControls.click.activate();</FONT><FONT SIZE=2 FACE="Arial"> the map will display.&nbsp; But if I include that line the map won&#8217;t load.&nbsp; In Firebug the following error occurs:</FONT></P>

<P><FONT SIZE=2 FACE="Arial">ActiveXObject is not defined 225var factory=null;if(typeof GearsFactory!='undefined'){factory=new GearsFactory();}else{try{factory=new ActiveXObject('Gears.Factory'); &#8230;(more follows, but it says the object is null).</FONT></P>

<P><FONT SIZE=2 FACE="Arial">One thing I'm not too sure of is if I have the proxy server correctly configured.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">If it helps, here is the code, minus the inline styles&#8230;</FONT>
</P>
<BR>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&lt;</FONT><FONT COLOR="#800000" SIZE=2 FACE="Arial">html</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&gt;</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;</FONT> <FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&lt;</FONT><FONT COLOR="#800000" SIZE=2 FACE="Arial">head</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&gt;</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;</FONT> <FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&lt;</FONT><FONT COLOR="#800000" SIZE=2 FACE="Arial">title</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&gt;</FONT><FONT COLOR="#000000" SIZE=2 FACE="Arial">OpenLayers test</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&lt;/</FONT><FONT COLOR="#800000" SIZE=2 FACE="Arial">title</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&gt;</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;</FONT> <FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&lt;</FONT><FONT COLOR="#800000" SIZE=2 FACE="Arial">script</FONT><FONT COLOR="#FF0000" SIZE=2 FACE="Arial"> type</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">=&quot;</FONT><FONT COLOR="#000000" SIZE=2 FACE="Arial">text/javascript</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&quot;</FONT><FONT COLOR="#FF0000" SIZE=2 FACE="Arial"> src</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">=&quot;</FONT><FONT COLOR="#000000" SIZE=2 FACE="Arial">openlayers/OpenLayers.js</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&quot;&gt;</FONT><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT> <FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&lt;/</FONT><FONT COLOR="#800000" SIZE=2 FACE="Arial">script</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&gt;</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;</FONT> <FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&lt;</FONT><FONT COLOR="#800000" SIZE=2 FACE="Arial">script</FONT><FONT COLOR="#FF0000" SIZE=2 FACE="Arial"> defer</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">=&quot;</FONT><FONT COLOR="#000000" SIZE=2 FACE="Arial">defer</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&quot;</FONT><FONT COLOR="#FF0000" SIZE=2 FACE="Arial"> type</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">=&quot;</FONT><FONT COLOR="#000000" SIZE=2 FACE="Arial">text/javascript</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&quot;&gt;</FONT><FONT COLOR="#000000" SIZE=2 FACE="Arial">.ProxyHost = &quot;proxy.php?url=&quot;;</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp; var map, infocontrols;</FONT>
</P>

<P><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp; function load() {</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var mapOptions = { maxExtent: new OpenLayers.Bounds(316615, 4749552, 662100, 5266295),</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Arial">: 'm',</FONT>

<BR>&nbsp;&nbsp;&nbs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&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Arial">};</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map = new OpenLayers.Map('map', mapOptions);</FONT>
</P>

<P><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var wms = new OpenLayers.Layer.WMS(</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;OpenLayers WMS&quot;,</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;</FONT><A HREF="http://myserver/wms/mapserv.exe?map=/wms/orthos.map&amp;"><U></U><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://myserver/wms/mapserv.exe?map=/wms/orthos.map&amp;</FONT></U></A><FONT COLOR="#000000" SIZE=2 FACE="Arial">&quot;,</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { layers: 'naip2009,naip09_5m_overview,naip09_100m_overview', transparent: 'false'}</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var naipIndex = new OpenLayers.Layer.WMS(</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Index&quot;,</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Arial">&quot;</FONT><A HREF="http://myserver/wms/mapserv.exe?map=/ms4w/apps/orthoviewer/htdocs/OrthoViewer/OrthoViewer.map&amp;"><U></U><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://myserver/wms/mapserv.exe?map=/ms4w/apps/orthoviewer/htdocs/OrthoViewer/OrthoViewer.map&amp;</FONT></U></A><FONT COLOR="#000000" SIZE=2 FACE="Arial">&quot;,</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Arial">{layers: 'NAIP2007 Imagery', transparent: 'true'}</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Arial">);</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; highlightLayer = new OpenLayers.Layer.Vector(&quot;Highlighted Features&quot;, {</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; displayInLayerSwitcher: false,</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isBaseLayer: false</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp; infoControls = {</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; click: new OpenLayers.Control.WMSGetFeatureInfo({</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; url: '</FONT><A HREF="http://myserver/wms/mapserv.exe?map=/ms4w/apps/orthoviewer/htdocs/OrthoViewer/OrthoViewer.map"><U></U><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://myserver/wms/mapserv.exe?map=/ms4w/apps/orthoviewer/htdocs/OrthoViewer/OrthoViewer.map</FONT></U></A><FONT COLOR="#000000" SIZE=2 FACE="Arial">',</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; title: 'Identify features by clicking',</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; layers: [naipIndex],</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; queryVisible: true</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; })</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT>
</P>
<BR>

<P><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addLayers([wms,naipIndex,highlightLayer]);</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addControl(new OpenLayers.Control.LayerSwitcher());</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; infoControls.click.activate();</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.zoomToMaxExtent();</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp; }</FONT>
</P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&lt;/</FONT><FONT COLOR="#800000" SIZE=2 FACE="Arial">script</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&gt;</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;</FONT> <FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&lt;/</FONT><FONT COLOR="#800000" SIZE=2 FACE="Arial">head</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&gt;</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;</FONT> <FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&lt;</FONT><FONT COLOR="#800000" SIZE=2 FACE="Arial">body</FONT><FONT COLOR="#FF0000" SIZE=2 FACE="Arial"> onload</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">=&quot;</FONT><FONT COLOR="#000000" SIZE=2 FACE="Arial">load()</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&quot;&gt;</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;</FONT> <FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&lt;</FONT><FONT COLOR="#800000" SIZE=2 FACE="Arial">p</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&gt;</FONT><FONT COLOR="#000000" SIZE=2 FACE="Arial">OpenLayers Test Map</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&lt;/</FONT><FONT COLOR="#800000" SIZE=2 FACE="Arial">p</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&gt;</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;</FONT> <FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&lt;</FONT><FONT COLOR="#800000" SIZE=2 FACE="Arial">div</FONT><FONT COLOR="#FF0000" SIZE=2 FACE="Arial"> style</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">=&quot;</FONT><FONT COLOR="#000000" SIZE=2 FACE="Arial">width:100%; height:100%; border-right: blue thick solid; border-top: blue thick solid; border-left: blue thick solid; border-bottom: blue thick solid;</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&quot;</FONT><FONT COLOR="#FF0000" SIZE=2 FACE="Arial"> id</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">=&quot;</FONT><FONT COLOR="#000000" SIZE=2 FACE="Arial">map</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&quot;&gt;&lt;/</FONT><FONT COLOR="#800000" SIZE=2 FACE="Arial">div</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&gt;</FONT></P>

<P><FONT COLOR="#000000" SIZE=2 FACE="Arial">&nbsp;</FONT> <FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&lt;/</FONT><FONT COLOR="#800000" SIZE=2 FACE="Arial">body</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&gt;</FONT>

<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&lt;/</FONT><FONT COLOR="#800000" SIZE=2 FACE="Arial">html</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&gt;</FONT><FONT SIZE=2 FACE="Arial"> </FONT>
</P>

</BODY>
</HTML>