Try adding a drawfeature control, that prompts for a text and sets it as the
label. Should be something like this this:

var control = new OpenLayers.Control.DrawFeature(
  layer,
  OpenLayers.Handler.Point, {
    featureAdded: function(feature) {
      feature.attributes.text = prompt('Write here:', '');
      feature.style.label = feature.attributes.text;
      feature.layer.drawFeature(feature);
    }
  }
);

-----
Best regards, 
Kristian Frost 
Webintegrator 
Orbicon Informatik 
--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Write-text-on-a-map-tp6741079p6741765.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to