[OpenLayers-Users] Re: Write text on a map
Frost89
kristian_frost7 at hotmail.com
Tue Aug 30 07:50:38 EDT 2011
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.
More information about the Users
mailing list