<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> </DIV>
<DIV>Indeed it is possible. I do the same with my application. See code snippet below:</DIV>
<DIV> </DIV>
<DIV>if(gTF==1){ <BR> var gate = new OpenLayers.Layer.Text( "Gate", {location: "./farmfiles/" + farmid + ".gate"} );<BR> map.addLayer(gate);</DIV>
<DIV>}</DIV>
<DIV> </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> </DIV>
<DIV>Kind regards,</DIV>
<DIV> </DIV>
<DIV>Robert Sanson<BR><BR>>>> Carl Morgan <carl.r.morgan@noaa.gov> 19/05/2008 11:25 p.m. >>><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 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>