[OpenLayers-Dev] this.renderer has no properties
Erik Uzureau
euzuro at gmail.com
Mon Feb 4 10:17:05 EST 2008
Dear Bart,
This does indeed seem like a valid reason for opening a ticket. Please do so!
thanks,
erik
On Feb 4, 2008 9:29 AM, Bart van den Eijnden (OSGIS) <bartvde at osgis.nl> wrote:
> Hi list,
>
> I occassionally run into the above js error in the function eraseFeatures of
> Vector.js.
>
> eraseFeatures: function(features) {
> this.renderer.eraseFeatures(features);
> },
>
> My use case is a vector layer which is displayed in a table, and only if
> somebody selects a row the feature is drawn. When the layer is destroyed the
> problem arises.
>
> The fix I did was to add a check for features in destroyFeatures.
>
> destroyFeatures: function(features) {
> var all = (features == undefined);
> if(all) {
> features = this.features;
> this.selectedFeatures = [];
> }
> // bartvde
> if (features) {
> this.eraseFeatures(features);
> var feature;
> for(var i=features.length-1; i>=0; i--) {
> feature = features[i];
> if(!all) {
> OpenLayers.Util.removeItem(this.selectedFeatures,
> feature);
> }
> feature.destroy();
> }
> }
>
> Should I open up a ticket? Or are there other ways to prevent this?
>
> Best regards,
> Bart
>
> --
> Bart van den Eijnden
> OSGIS, Open Source GIS
> http://www.osgis.nl
>
>
>
>
>
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>
More information about the Dev
mailing list