[OpenLayers-Users] Re: SLDSelect doesn't highlight anything
vrbikdan
vrbikdan at gmail.com
Mon Apr 23 02:41:46 EDT 2012
Hmm, I tried to set transform function, but in fact, I don't know, where in
my code I should write it. Let supposse I have this code for selection:
select = new OpenLayers.Layer.Vector("Selection", {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();
So I tried to set select.transform(map.projection,map.displayProjection);
(where projection is 900913 and displayProjection is 4326), than
control.transform(map.projection,map.displayProjection);. Both with the same
end: Object # has no method 'transform'. So I don't know, where I should
define transform or what I should transform. In my map I have handler for
writting coordinates on click in map and there I'm using transform, so in
fact, I have somewhere stored position of last click in two variables as
4326, so can I use it somehow?
Thanks
Dan
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/SLDSelect-doesn-t-highlight-anything-tp4689209p4909338.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list