<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>Hi Carl</DIV>
<DIV>&nbsp;</DIV>
<DIV>Indeed it is possible. I do the same with my application. See code snippet below:</DIV>
<DIV>&nbsp;</DIV>
<DIV>if(gTF==1){ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var gate = new OpenLayers.Layer.Text( "Gate", {location: "./farmfiles/" + farmid + ".gate"} );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addLayer(gate);</DIV>
<DIV>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>In this case, I use a variable called farmid, and the text file is composed of this plus some other bits.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Kind regards,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Robert Sanson<BR><BR>&gt;&gt;&gt; Carl Morgan &lt;carl.r.morgan@noaa.gov&gt; 19/05/2008 11:25 p.m. &gt;&gt;&gt;<BR></DIV>
<DIV style="COLOR: #000000">Hello,<BR><BR>I am very new to OpenLayers and just as new to javascript, so I <BR>apologize in advance for my lack of basic understanding of all of this.<BR><BR>But, I am attempting to plot points on a map using <BR>OpenLayers.Layers.Text and it works just fine. However I would ideally <BR>like to pass the filename in through the URL. In the following line, I <BR>would like to replace "./lsrtext.txt" with a variable but am having no <BR>luck.<BR><BR>var newl = new OpenLayers.Layer.Text( "text", {location: "./lsrtext.txt"} );<BR><BR>Is it possible to do such a thing? I have the code working which <BR>processes the variable name, and I am able to process the lat, lon and <BR>zoom level this way. But I can't seem to get it working with the <BR>filename. The documentation states that the URL of the text file can't <BR>be changed once passed in. Does this count as changing?<BR><BR>Thanks for any help!<BR><BR>-Carl<BR>_______________________________________________<BR>Users mailing list<BR>Users@openlayers.org<BR><A href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</A><BR><BR></DIV><br><br><table bgcolor=white style="color:black"><tr><td><br>------------------------------------------------------------------<br>
The&nbsp;contents&nbsp;of&nbsp;this&nbsp;email&nbsp;are&nbsp;confidential&nbsp;to&nbsp;AsureQuality.&nbsp;If&nbsp;you&nbsp;have&nbsp;received&nbsp;this&nbsp;communication&nbsp;in&nbsp;error&nbsp;please&nbsp;notify&nbsp;the&nbsp;sender&nbsp;immediately&nbsp;and&nbsp;delete&nbsp;the&nbsp;message&nbsp;and&nbsp;any&nbsp;attachments.&nbsp;The&nbsp;opinions&nbsp;expressed&nbsp;in&nbsp;this&nbsp;email&nbsp;are&nbsp;not&nbsp;necessarily&nbsp;those&nbsp;of&nbsp;AsureQuality.&nbsp;This&nbsp;message&nbsp;has&nbsp;been&nbsp;scanned&nbsp;for&nbsp;known&nbsp;viruses&nbsp;before&nbsp;delivery.&nbsp;AsureQuality&nbsp;supports&nbsp;the&nbsp;Unsolicited&nbsp;Electronic&nbsp;Messages&nbsp;Act&nbsp;2007.&nbsp;If&nbsp;you&nbsp;do&nbsp;not&nbsp;wish&nbsp;to&nbsp;receive&nbsp;similar&nbsp;communications&nbsp;in&nbsp;future,&nbsp;please&nbsp;notify&nbsp;the&nbsp;sender&nbsp;of&nbsp;this&nbsp;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>