Encontre una solucion pero usando el protocolo WFS, habilite mi mapserver
como wfs con 'wfs_enable_request' '*' tanto en la capa en su seccion
metadata como tambien en la seccion WEB del mapa general. les dejo la
funcion para que vean como quedo y la usen quien tenga el mismo problema.
Lo adapte del ejemplo
http://openlayers.org/dev/examples/getfeature-wfs.html, pero no anda y hay
que por alguna razon no manda el parametro  PropertyName, el no es pasado
por OP a mi servidor, esto se arregla agregando en el constructor de la
clase  OpenLayers.Protocol.WFS.fromWMSLayer la propiedad {geometryName:
'msGeometry'}

this._highligh_control = function(_layer)
                                        {
                                         var control = this.highlighControl;
                                         var select  = this.highligh_select;
                                         var hover   = this.highligh_hover;
                                                                                
                                 
                                        select = new 
OpenLayers.Layer.Vector("Selection", {styleMap:new
OpenLayers.Style(OpenLayers.Feature.Vector.style["select"]) });
                                                                                
        hover = new OpenLayers.Layer.Vector("Hover");
                                                                                
         
                                                                                
        this.op_map.addLayer(select);
                                                                                
        this.op_map.addLayer(hover);
                                                                                
                                
                                                                                
                                control = new 
OpenLayers.Control.GetFeature({protocol:
OpenLayers.Protocol.WFS.fromWMSLayer(_layer,{geometryName:
'msGeometry'}),box: true,hover: true,multipleKey: "shiftKey",toggleKey:
"ctrlKey"});
            
                                                                                
        control.events.register("featureselected", this,
function(e) {   select.addFeatures([e.feature]); });
                                                                                
        control.events.register("featureunselected", this,
function(e) { select.removeFeatures([e.feature]); });
                                                                                
        control.events.register("hoverfeature", this,
function(e) { hover.addFeatures([e.feature]); });
                                                                                
                control.events.register("outfeature", this,
function(e) { hover.removeFeatures([e.feature]);});
                                                                                
                
                                                                                
        this.op_map.addControl(control);
                                                                                
        control.activate();
                                                                                
                                
                                                                                
                        };                      

Saludos                 



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/Openlayers-SLDSelect-tp5000653p5000664.html
Sent from the OSGeo Spanish Local Chapter mailing list archive at Nabble.com.
_______________________________________________
Spanish mailing list
http://lists.osgeo.org/mailman/listinfo/spanish
http://es.osgeo.org
http://twitter.com/osgeoes

Responder a