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 vector layer and label: "${title}" is used as one of style property for its rendering. Is it possible to set feature.attribute.title property before feature will be drawn by DrawFeature control? Now for newly created feature I get "undefined" label. Of course I can use "beforefeatureadded" event, but my layer contains many features and I want this event triggers only for newly created features.

share|improve this question

I've solved my problem by overriding drawFeature method of DrawFeature control. See my pull request. Now it is possible to set custom features attribute inside featureAdded function and only after that draw them.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.