[OpenLayers-Users] OpenLayers.Layers.Text with variable filename as
input
Carl Morgan
carl.r.morgan at noaa.gov
Mon May 19 07:25:27 EDT 2008
Hello,
I am very new to OpenLayers and just as new to javascript, so I
apologize in advance for my lack of basic understanding of all of this.
But, I am attempting to plot points on a map using
OpenLayers.Layers.Text and it works just fine. However I would ideally
like to pass the filename in through the URL. In the following line, I
would like to replace "./lsrtext.txt" with a variable but am having no
luck.
var newl = new OpenLayers.Layer.Text( "text", {location: "./lsrtext.txt"} );
Is it possible to do such a thing? I have the code working which
processes the variable name, and I am able to process the lat, lon and
zoom level this way. But I can't seem to get it working with the
filename. The documentation states that the URL of the text file can't
be changed once passed in. Does this count as changing?
Thanks for any help!
-Carl
More information about the Users
mailing list