[OpenLayers-Trac] Re: [OpenLayers] #3389: Vector.getFeatureBy
returns nothing, while firebug shows the data
OpenLayers
trac-20090302 at openlayers.org
Tue Jun 28 08:13:49 EDT 2011
#3389: Vector.getFeatureBy returns nothing, while firebug shows the data
---------------------+------------------------------------------------------
Reporter: cspan | Owner:
Type: bug | Status: new
Priority: minor | Milestone: 2.12 Release
Component: general | Version: 2.10
Keywords: | State:
---------------------+------------------------------------------------------
Comment(by cspan):
Bart, it's just my terrible naming standard on PoC's... layer is just a
local var containing a reference to my OpenLayers.Layer.Vector. It's the
same as var vector, just used in a different .js file. For clarification,
a bit of renaming:
var myVectorLayer = new OpenLayers.Layer.Vector("testvectorlaag");
var point = new OpenLayers.Geometry.Point(-72, 42);
var featurePoint = new OpenLayers.Feature.Vector(point,
{loc_code:'AA0123456789'}); myVectorLayer .addFeatures([featurePoint]);
map.addLayer(myVectorLayer );
var feature = myVectorLayer.getFeatureBy('loc_code', 'AA0123456789');
--
Ticket URL: <http://trac.openlayers.org/ticket/3389#comment:2>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list