[OpenLayers-Dev] Questions about onFeatureInsert() and Features.state

jc A jcalbert802 at yahoo.fr
Wed Mar 28 12:27:34 EDT 2007


Hi,

I have a question about onFeatureInsert(..) called in OpenLayers.Layer.Vector.addFeatures(..).

If we use this event to set the feature style, we need to do like in
openmnnd.html : force the drawGeometry(..) to refresh the shape. So we draw twice the geometry
when adding the feature to the layer.

Why this event is it called after drawing the geometry ? why not calling it before ?
Else, do we need another event like 'onBeforeFeatureInsert(..)' which would be used to set geometry style before it is drawn?

---

A remark about OpenLayers.Feature.Vector.state :

In OpenLayers.Feature.Vector.initialize(..) Line ~50
this.state should be initialized like :
this.state = OpenLayers.State.UNKNOWN;

Or, in the function toState(..) you should add a 'defaut:' at lines ~213 and ~234 to manage the case where : this.state is null

---

And the last question :

Is it possible today to not draw (hide) a  'deleted' feature ?
I mean a feature where feature.state is OpenLayers.State.DELETE ?


Regards.

Jean-Christophe ALBERT









	

	
		
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20070328/78f736b6/attachment.html


More information about the Dev mailing list