[OSM-dev] Openlayers and OSM: How to show some text near "marker icons"?

Ulf Lamping ulf.lamping at web.de
Thu Mar 27 20:51:02 GMT 2008


For some days I'm experimenting with a motorcycle related map of europe 
using "standard" OSM maps (osmarender / mapnik served tiles) and 
openlayers. "My map" is currently not online as I have to sort out 
licensing stuff, e.g. of the used icons.

Using openlayers (and the mechanism described in: 
I'm displaying lot's of mountain passes and some other motorcycle 
related things, the data is derived from wikipedia information (and 
because of the different licenses GFDL vs. CC-BY-SA2.0 I - 
unfortunately  - can't include them into OSM :-(

However, with openlayers I'm able to display specific icons for the 
mountain passes and clicking on them get's a pop up with more detailed 
info like a link to wikipedia. This is done using a text file containing 
the infos in a tab seperated file.

But - even after having a deep look at the openlayer API docs and the 
various examples, I couldn't find a way to display a little text near 
the icon, e.g. "Stilfser Joch", this would make the map much more 
useful. Currently it's a bit annoying to search for a specific mountain 
pass - click on each icon to show the pop up until you get the right one :-(

Am I just too blind to see? Is there a way to show a small text near an 
icon using openlayers?

Regards, ULFL

More information about the dev mailing list