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

Arnd Wippermann arnd.wippermann at web.de
Mon Apr 18 13:05:56 EDT 2011


Hi,
 
in the attached textfile there is a blank instead of tabulator between point
and title in the header. Change the blank to tab and it should work.
 
Arnd
 
  _____  

Von: Sukuchha Shrestha [mailto:sukuchha at yahoo.de] 
Gesendet: Montag, 18. April 2011 09:56
An: users at openlayers.org
Cc: arnd.wippermann at web.de
Betreff: WG: AW: [OpenLayers-Users] example of OpenLayers.Format.Text using
vectors


Hi Arnd,

My projection of the Map is also WGS1984. And my textfile are in the format
point, tittle which i have attached to the mail.

sukuchha 

----- Weitergeleitete Mail ----
Von: Arnd Wippermann <arnd.wippermann at web.de>
An: Sukuchha Shrestha <sukuchha at yahoo.de>
CC: users at openlayers.org
Gesendet: Freitag, den 15. April 2011, 21:36:59 Uhr
Betreff: AW: [OpenLayers-Users] example of OpenLayers.Format.Text using
vectors


Hi,
 
your code snippet seems to be correct.
 
What projection you are using for your map? 
Can the textfile be found?
 
Arnd
 
 
  _____  

Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Sukuchha
Shrestha
Gesendet: Freitag, 15. April 2011 17:07
An: openlayers-users at lists.osgeo.org
Betreff: [OpenLayers-Users] example of OpenLayers.Format.Text using vectors


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/20110418/3883229f/attachment.html


More information about the Users mailing list