0

here's my case: i have a panelForm with 4 fields, and a search button, that search for the features that correspond to the 4 fields given by the user. and i have two layers that both contains the 4 fields. after the search i have two gridpanel, each one hold data(attributes) from each layer corresponding to the found feature, now i only get the features of only one gridPanel, because the panel form accept only one protocol.

Plz how can i get the other attribute corresponding to the founded feature from the other layer.

thnks in advance

0

Well, hook a read on data of second grid when data become available at first grid. This is basically an event binding problem.

If you already added the features to each layer, you can walk the feature list by requesting the layers features array. Assuming you have a vector layer.

(OpenLayers.Layer.Vector).features //first layer
(OpenLayers.Layer.Vector).features //second layer

(OpenLayers.Layer.Vector).features[0].atributes //attributes of this feature
  • yes but i need the features that correspond to the items given by the user in the form panel. because the formpanel do only one search over the protocol1 used. what i want is to search on the second protocol with the same items that the user provide. is there a way a request or somthing like that ? – Geographic May 17 '13 at 1:34
  • Can not you clone the formPanel object replacing the protocol1 with protocol2 and launch a second request then delete cloned object? So you click once and trigger two events? I do not use this library but have done things like you wish using other libraries. – cavila May 17 '13 at 2:04
  • but if i cloned the formpanel the items for one of them will not be filled, so the user have to tape twice :s :s – Geographic May 17 '13 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.