Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I want to remake gxp.editFeature class. In standart class to edit object need to choose it on map. I want choose abject in list of objects and edit it.
So To do this i need make a new gxp.editFeature class. Actualy i have to remake only this.selectControl = new OpenLayers.Control.SelectFeature() and add select() method in this class. And there my questions:
1 How to add objects from list to select? I use WMS so getFeaturesByAttribute()will work?
2 How to do that selectControl can see my layer?

share|improve this question
    
D'you want to extend OpenLayers.Control.SelectFeature() class? –  Aragon Jul 18 '12 at 6:15
    
Now i see that gxp.featureManager create WFS layer, so getFeaturesByAttribute() gonna works. This solved my questions. But i have another. If i have a list with objects and buttons for each object how to send something about chosen object to gxp? –  Kliver Max Jul 18 '12 at 6:48
    
Do this var ffff = featureManager.featureLayer.getFeaturesByAttribute("id",'123'); alert(ffff.length); this.selectControl.select(ffff[0]);. Have '1' in alert but object dont select in map. What can be wrong? –  Kliver Max Jul 18 '12 at 7:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.