Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Open Layers map project where I currently add dynamic markers based on a query but I really want to show some text instead of the marker icon. Is there a way I can either render some text to a png and pass that to the marker object. Or better still pass text to a marker for display instead of an icon.

currently using this code to show a marker

 var size = new OpenLayers.Size(32,32);
var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
var icon = new OpenLayers.Icon("./images/DrawingPin2.png",size,offset);
marker = new OpenLayers.Marker(lonlat,icon);


share|improve this question
Yeah I saw that I was hoping for another way. How do I exclude the field name. They have name: xyz I will just want to render a price $ n.99 with a nice background (i guess i can use CSS for that ??) – MB. Aug 22 '12 at 12:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.