Dear All,<br>I am trying to overlay some points with google satellite layer and access the attributes of these points using OpenLayers.Protocol.WFS and GeoExt Popup.<br>It only works if I use native projection of the point layer without overlay with google.<br>
I tried to reproject point layer to google Projection. Probably it is the best option as in this case the geoserver do not need to reproject data on fly for each request.<br>I used Q-GIS and 2 different proj4 strings:<br>
+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs<br>+proj=merc +lon_0=0 +lat_ts=0 +x_0=0 +y_0=0 +a=6378137 +b=6378137 +units=m +no_defs<br>But in this case my data is slightly shifted when I overlay it with google.<br>
Please, please help me to either reproject original data into Google projection or to set up OpenLayers to reproject data into Google on fly and be able to access features.<br><br>If I use protocol: OpenLayers.Protocol.WFS.fromWMSLayer(points) then Popup shortly comes up in a different place and dissappears.<br>
<br>I am using OpenLayers OpenLayers 2.8 -- $Revision: 9492<br>Point layer comes from Geoserver 2.0.0<br><br>Any help would be highly appreciated,<br>Alex<br><br><br>Here is the code:<br><br> var points = new OpenLayers.Layer.WMS(<br>
"Pegel BW",<br> "<a href="http://hboard.iwk.uni-karlsruhe.de:8080/geoserver/wms">http://hboard.iwk.uni-karlsruhe.de:8080/geoserver/wms</a>",<br> {<br> transparent: 'TRUE',<br>
layers: 'regio:pegel_bw',<br> styles: ''<br> },<br> {<br> isBaseLayer: false,<br> reproject: true<br> });<br><br> select = new OpenLayers.Layer.Vector("Selection", {<br>
styleMap: new OpenLayers.Style(OpenLayers.Feature.Vector.style["select"])<br> , projection: "EPSG:31467"<br> , reproject: true<br> });<br><br> control = new OpenLayers.Control.GetFeature({<br>
protocol: new OpenLayers.Protocol.WFS.v1_1_0({<br> url: "<a href="http://hboard.iwk.uni-karlsruhe.de:8080/geoserver/wfs">http://hboard.iwk.uni-karlsruhe.de:8080/geoserver/wfs</a>",<br> maxFeatures: 200,<br>
featureType:"pegel_bw",<br> featureNS: "<a href="http://ihwarcgis2.bau-verm.uni-karlsruhe.de:8080/geoserver/regio">http://ihwarcgis2.bau-verm.uni-karlsruhe.de:8080/geoserver/regio</a>",<br>
geometryName: "the_geom",<br> srsName: "EPSG:31467",<br> reproject: true<br> }),<br> box: false,<br> toggleKey: "ctrlKey",<br> 'reproject': true<br>
});<br> <br> control.events.register("featureselected", this, function(e) {<br> select.addFeatures([e.feature]);<br><br> popup = new GeoExt.Popup({<br> title: 'BW-Abluss',<br>
feature: e.feature,<br> width:390,<br> height:360,<br> html: "", <br> maximizable: false,<br> collapsible: true,<br> autoScroll: true<br>
});<br> popup.add(tabpanel);<br> popup.show();<br> <br><br>