[OpenLayers-Users] Re: SLDSelect doesn't highlight anything

vrbikdan vrbikdan at gmail.com
Fri Apr 20 02:40:50 EDT 2012


Oh, in fact, transform SRS is for me black magic. I tried to add projection:
new OpenLayers.Projection("EPSG:900913"), displayProjection: new
OpenLayers.Projection("EPSG:4326") and change whole info to: 

select = new OpenLayers.Layer.Vector("Selection", {projection: new
OpenLayers.Projection("EPSG:900913"), styleMap: new
OpenLayers.Style({'fillOpacity': 1,'fillColor': "#FFFF00",'strokeColor':
"#FFFF00"})});
map.addLayer(select);
control = new OpenLayers.Control.GetFeature({
protocol: OpenLayers.Protocol.WFS.fromWMSLayer(vrstvy['vrstvaC'])});
control.events.register("featureselected", this, function(e) {
select.addFeatures([e.feature]); alert(1);});
control.events.register("featureunselected", this, function(e) {
select.removeFeatures([e.feature]);});
map.addControl(control);
control.activate();

And now is in request srsName="EPSG:900913", but nothing changed. I'm using
Geoserver and PostGis, so all of my data are in 4326 and this is define as
declared srs in Geoserver. Funny thing is, that wmsgetfeatureinfo work
normal so in which is this different? :(

Thanks
Dan

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/SLDSelect-doesn-t-highlight-anything-tp4689209p4900999.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list