[OpenLayers-Users] CVS format for OpenLayers.Layer.Text?

Alexandre Leroux alexandre.leroux at ec.gc.ca
Wed Jan 31 16:42:24 EST 2007


Thanks Bill,

It now works wonderfully :-) The documentation really needs updates! 
It's also indicated in the doc that OpenOffice can generate the "CVS" 
file for OpenLayers.Layer.Text while it can't generate the required 
tab-delimited file.

Cheers,

Alex :-)


Bill Woodall wrote:
> On Wed, 2007-01-31 at 20:06 +0000, Alexandre Leroux wrote:
>> Hi list,
>>
>> Wow. OpenLayers is so easy to use. I'm enthusiastic :-)
>>
>> Using 2.3-rc2, I have some problems with:
>> http://openlayers.org/doc/reference.html#OpenLayers.Layer.Text
>>
>> It is said the textfile must be in CSV, but when looking at the example 
>> textfile.txt, here copied:
>> point title description icon
>> 10,20 my orange title   my orange description
>> 2,4   my aqua title  my aqua description
>> 42,-71   my purple title   my purple description<br/>is great. 
>> http://www.openlayers.org/api/img/zoom-world-mini.png
>>
>> This is obviously not comma separated.
>>
>> I failed to generate any text file that would be successfully read by 
>> OpenLayers.Layer.Text. Anyone can reduce the confusion?
>>
>> Thanks,
>>
>> Alex
> 
> Hi Alex,
> 
> The docs should refer to the textfile as a Delimiter-separated values
> (DSV) instead of Comma-separated values (CSV) and in this case the DSV
> are tabs.
> 
> The required columns for the textfile are;
>  point     x,y pair in the appropriate units
>    or
>  lon       the "x" coordinate 
>  lat       the "y" coordinate
> 
> optional columns are;
>  title        popupContentHTML Title
>  image,icon   url to the "stick pin" image/icon
>  iconSize     yes, the size you want the image/icon to be
>  iconOffset   you guess it, the offset 
> 	(for a stickpin use something  width/2,-height to position
> 	the image/icon over the point )
>  description  popupContentHTML desc
> 
> Hope that helps
> 
> .........Bill,
> OL/TC user
> 
> 

-- 
Alexandre Leroux, M.Sc., Ing.
Environnement Canada / Environment Canada
Centre météorologique canadien / Canadian Meteorological Centre
Division de la réponse aux urgences environnementales /
Environmental Emergency Response Division
alexandre.leroux at ec.gc.ca



More information about the Users mailing list