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 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

1 Answer 1

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

 
discard

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.