[OpenLayers-Users] layer.text : changing defaults

Yves Moisan yves.moisan at boreal-is.com
Wed Oct 22 14:08:38 EDT 2008


Hi All,

I'm using OpenLayers.Layer.Text because I find it very useful to use a
textfile.  However, I would like to alter some of the defaults :

- default icon : I want an icon different than the red marker in case my
textfile has no icon,size,offset; I was thinking of either a way to tell
the OpenLayers.Layer.Text constructor "here's the default if
icon,size,offset is null" (?) or override the OpenLayers default icon; I
guess the latter is more feasible, but I have no clue how; I'm referring
to the OL library using the Current Stable API url.

- default popup object : there seems to be no way to specify the size of
the popup; I saw a popupSize attribute in some OSM example, but that
does not seem to be recognized by OL in my case; can popup size be
controlled ?  I also noticed the popup contents is shown behind the
other default OL controls, like the zoom in/zoom out, which results in
contents being partly hidden.

This is probably pushing a bit much, but ideally one would have a choice
of popup object when using a text layer.  I would like to use a
FramedCloud, but I did not see examples with text layers.  Thanx fo
pointers.

Cheers,

Yves Moisan




More information about the Users mailing list