I'm kinda new to OpenLayers and I would like to ask whats the problem in my code. This is actually just from the examples I got from the internet but I seem can't make it work. All I want to do is to make POIs using Openlayers.layers.text.
map = new OpenLayers.Map("mapdiv");
map.addLayer(new OpenLayers.Layer.OSM());
var pois = new OpenLayers.Layer.Text( "My Points",
{ location:"./textfile.txt",
projection: map.displayProjection
});
map.addLayer(pois);
and in my textfile is
lat lon title description iconSize iconOffset icon
10 20 title description 21,25 -10,-25 http://www.openlayers.org/dev/img/marker.png
I've been trying to figure out whats wrong with my codes all day but i cant make it work. Can anyone help me to figure out whats wrong with my code? only the map will be shown with no popup/marker..