For loading features locally you can try:
lay_vector = new OpenLayers.Layer.Vector("Text Layer");
OpenLayers.Request.GET({
url: 'map_data.txt',
success: function(e) {
doc = e.responseText;
parser = new OpenLayers.Format.Text();
lay_vector.addFeatures(parser.read(doc));
}
});
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/Why-does-this-code-not-work-locally-tp6115836p6152565.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users