[OpenLayers-Users] How do I add text Labels?

Jeff Dege jdege at korterra.com
Wed Mar 28 11:49:49 EDT 2007


I'm working on a map on which I dynamically draw a bunch of polygons,
using the new Vector layer.

I need to put a text label on each.

I don't see any way of adding text to a vector layer, so I figure I'm
going to need a separate layer for the text, but I'm not seeing how to
do that, either.

Browsing through the source, the only obvious match for what I'm trying
to do is Marker.Text, but that seems designed for tying popups to
markers based on the contents of text files.  I can't have text files,
and I don't want markers or popups, I just want text labels drawn at
specific points.

What am I missing?





More information about the Users mailing list