[OpenLayers-Users] IE 6 chokes on "var featureId = node._featureId; " in getFeatureIdFromEvent(). What's up with that?

palewire ben.welsh at gmail.com
Mon Feb 9 14:56:14 EST 2009


Christopher, 

Thank you for the response.

The error is thrown from within the OpenLayers code. Though my application
code is triggering a modification event that might be sending it bad input.
I'm using the collection of methods from the GeoDjango admin widget. 

Their template can be found here:
http://code.djangoproject.com/browser/django/trunk/django/contrib/gis/templates/gis/admin/openlayers.js

And my complete rendered version is here: http://dpaste.com/hold/118655/

Basically it hooks its own modify function to the corresponding event, like
so.

"""

geodjango_polygon.modify_wkt = function (event) {
    if (geodjango_polygon.is_collection) {
        if (geodjango_polygon.is_point) {
            geodjango_polygon.add_wkt(event); 
            return;
        } else {
        // When modifying the selected components are added to the 
        // vector layer so we only increment to the `num_geom` value.
            var feat = new OpenLayers.Feature.Vector(new
OpenLayers.Geometry.MultiPolygon());
            for (var i = 0; i < geodjango_polygon.num_geom; i++) {
               
feat.geometry.addComponents([geodjango_polygon.layers.vector.features[i].geometry]);
            }
            geodjango_polygon.write_wkt(feat);
        }
    } else {
        geodjango_polygon.write_wkt(event.feature);
    }
};

...

geodjango_polygon.layers.vector.events.on({"featuremodified" :
geodjango_polygon.modify_wkt});

"""

I'm digging through Firebug now looking for this "node" element -- and not
finding it in my the feature objects in the vector layer. Is that where it
should be? I really must confess my ignorance about how this is supposed to
work -- and continue to be stymied by how it works in one browser but not
another. It makes we worry this is just one of those duplicate name issues
that IE chokes or something not worth so much analysis.

Any tips on even how to properly debug this sort of thing would be
appreciated -- if a silver bullet isn't available.


Christopher Schmidt-2 wrote:
> 
> Does 'node' exist? If it doesn't, then this would be expected behavior.
> Is this code inside of OpenLayers, or inside your own application code?
> 
> Regards,
> -- 
> Christopher Schmidt
> MetaCarta
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://n2.nabble.com/IE-6-chokes-on-%22var-featureId-%3D-node._featureId-%22-in-getFeatureIdFromEvent%28%29.-What%27s-up-with-that--tp2298911p2299073.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list