Hi all, I have an openlayers app up at http://pocus.wustl.edu/wfs with a wfs layer that retrieves data from featureserver.
At one point, this was working. There's no telling what I've done but I can't figure it out. So, once you click 'update map', the wfs layer is added (appears in layers tab), but javascript throws an error: Error: syntax error Source File: http://pocus.wustl.edu/wfs/ Line: 1, Column: 1 Source Code: An error occurred: 'list' object has no attribute 'value' line 1 column 1, great. It's definitely triggered on map.addLayer(wfs); The important parts are in the function UpdateMap(): //get variables and form url wfs = new OpenLayers.Layer.WFS("WFS", url, {maxfeatures: 3000, typename: 'topp:multipolygon'}, {ratio: 1.0, extractAttributes: true}); wfs.preFeatureInsert= function(feature){ features["\""+feature.fid+"\""] = feature; var co = parseInt(feature.attributes['value']); ///there is a feature.attributes['value'], don't think it's this but I guess it might be if (co > scales[4]) feature.style.fillColor="red"; else if (co > scales[3]) feature.style.fillColor="#E79518"; else if (co > scales[2]) feature.style.fillColor="#A8F257"; else if (co > scales[1]) feature.style.fillColor="#00F2AE"; else if (co > scales[0]) feature.style.fillColor="#1A95E5"; else feature.style.fillColor="blue"; fcount++; //feature.style.fillOpacity=0; }; wfs.events.register("loadend", wfs, "hide_load()"); map.addLayer(wfs); // document.write(wfs.getFullRequestString()); var select = new OpenLayers.Control.SelectFeature(wfs, {onSelect: onFeatureSelect, onUnselect: onFeatureUnselect}); map.addControl(select); select.activate(); wfs.getFullRequestString() prints out a functional request that I can straight paste and get XML example: http://pocus.wustl.edu/cgi-bin/featureserver3/featureserver.cgi/GIS?format=WFS&issum=true¶m=CO&value=100&BBOX=-95.922852,35.402222,-89.880371,41.851196&maxfeatures=3000&typename=topp%3Amultipolygon&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A4326 (It takes a little over a minute for the SQL to return and featureserver to print, but it does eventually print) Anyone have any ideas what list object is trying to access a value but can't, and why it's thrown immediately upon adding the layer to the map? I would just be unbelievably grateful for any and all help. Thanks! -Ed
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
