Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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);
marker.setOpacity(1.0);
airportLayer.addMarker(marker);

Thanks

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

 
discard

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

Browse other questions tagged or ask your own question.