[OpenLayers-Users] can't view text layer

Alok Jadhav alok at cse.iitb.ac.in
Sun May 13 08:38:52 EDT 2007



I could solve the problem.
The problem was that we need to put lat lon in the point value instead of 
lon lat which i have used ...
also .. I missed the tabs in the first line ...rest all the lines had tabs 
:)

-Alok

On Sun, 13 May 2007, Alok Jadhav wrote:

>
>
> Hello,
>  I want to display some markers from a file using OpenLayers.Layer.Text()
>
> my textfile is like this:
>
> point   title   description     icon
> 72.82488,18.90948       COLABA1 COLABA1
> 72.79488,18.9594        COLABA2 COLABA2
> 72.89488,19.10948       COLABA3 COLABA3
> 72.92488,19.159 COLABA4 COLABA4
> http://www.openlayers.org/api/img/zoom-world-mini.png
>
> (The values are tab seperated!)
>
>
> and part of code to use this file is :
>
> <snippet>
> textLayer = new OpenLayers.Layer.Text( "text", {location:
> "./textfile2.txt"} );
>
> 	markers = new OpenLayers.Layer.Markers( "Markers" );   // Markers
> for selected stop!
> 	var size = new OpenLayers.Size(22,32);B
>         var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
> 	tile = new OpenLayers.Layer.KaMap( "Mumbai Navigator
> KaMap","http://10.129.112.144:8080/mumbai/tile.php", {'layers': 'mumbai',
> map: 'mumbai', i: 'JPEG'} );
> 	busStops = new OpenLayers.Layer.KaMap("Bus stops",
> "http://10.129.112.144:8080/mumbai/tile.php", {'g': 'grp', map: 'mumbai'},
> {'isBaseLayer': false});
> 	map.addLayers([tile, busStops, vectorLayer, markers, textLayer]);
> </snippet>
>
>
> I cannot see any of the markers from the textfile on the map. If I add the
> markers manually using OpenLayers.Layer.Markers, they are visible but
> nothing from the text layer.
>
> I am just not able to solve this problem. I can't seem to know what is
> the problem.  Please some1 tell me where I am going wrong.
>
> thanks in advance.
>
> -Alok
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



More information about the Users mailing list