[OpenLayers-Users] Text Layer in projection != 4326 ?

Bart van den Eijnden (OSGIS) bartvde at osgis.nl
Fri Nov 30 05:29:27 EST 2007


We use it in the Dutch National Grid without problems.

Are you aware that you need to use Y,X in your textfile instead of X,Y?

Best regards,
Bart

RIVIERE Robert - CETE Méditerr./DI/ETER schreef:
> Hello,
>
> I'm trying to use the Text Layer from a flat file as shown in http://www.openlayers.org/dev/examples/markersTextLayer.html
>
> It works perfectly, but if I switch to another projection (with corresponding x,y for markers in the text file, of course), I can't see anymore the markers.
>
> Here are parts of the code :
>
>             map = new OpenLayers.Map('map',{
> 		'projection': 'EPSG:27582',
> 		'units':'meters',
> 		'maxExtent': new OpenLayers.Bounds(750000,1760000,985000,1930000),
> 		'maxResolution':'auto'
> 		});
> ...
>             var newl = new OpenLayers.Layer.Text( "text", {location: "textfile.txt"} );
>             map.addLayer(newl);
>
> and the test textfile.txt :
> 882000.,1830000.	my orange title	my orange description	
>
> Am I missing something ? Or Layer.Text doesn't support all projections ?
>
> Thanks a lot
>
> Robert
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
>   


-- 
Bart van den Eijnden
OSGIS, Open Source GIS
bartvde at osgis.nl
http://www.osgis.nl




More information about the Users mailing list