[OpenLayers-Users] example of OpenLayers.Format.Text using vectors

Sukuchha Shrestha sukuchha at yahoo.de
Fri Apr 15 11:07:01 EDT 2011


Hello nice people,

I am trying to load my point data in a text file but somehow it is not working. 
I have scour the mail list, but still i am able to display my points ! My points 
are in the format of text file separated by tab ! Why it is not working ? If 
anybody can help, i would be a happy man !!



        //Add vector layer
        vector_layer = new OpenLayers.Layer.Vector('Basic Vector Layer', {
        protocol: new OpenLayers.Protocol.HTTP({
        url: "map_data.txt",
        format: new OpenLayers.Format.Text()}),
projection: new OpenLayers.Projection("EPSG:4326")
});
        map.addLayer(vector_layer);
         map.addControl( new OpenLayers.Control.LayerSwitcher());
 
        
Thanks
sukuchha 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110415/6c650714/attachment.html


More information about the Users mailing list