<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello Joanne:<br>
<br>
I am headed out of the office but wanted to give you something to
consider....have you read: <a
 href="http://docs.openlayers.org/spherical_mercator/" target="_top"
 rel="nofollow"><span>http://docs.openlayers.org/spherical_mercator/</span></a>
which discusses projection issues using google, yahoo, ve, etc with
user created layers.<br>
<br>
Also, I am working on projection issues as well.&nbsp; I started a post
which discusses projection issues which may help you with yours.&nbsp; If
you go to my layer intialization script
(<a class="moz-txt-link-freetext" href="http://webmap.rthicksconsult.com/c2corgCreateMap_projection.js">http://webmap.rthicksconsult.com/c2corgCreateMap_projection.js</a>) you
will see how I had to add {'shericalMercator':true}.&nbsp; As an example<br>
<br>
<pre>        gsatellite = new OpenLayers.Layer.Google("Google Satellite", {type:G_HYBRID_MAP, 'sphericalMercator': true, buffer:0} );
        map.addLayer (gsatellite);
</pre>
<br>
My thread is at
<a class="moz-txt-link-freetext" href="http://www.nabble.com/Cannot-display-search-marker-when-projecting-layers-to-EPSG-900913-td20771840.html#a20771840">http://www.nabble.com/Cannot-display-search-marker-when-projecting-layers-to-EPSG-900913-td20771840.html#a20771840</a>.<br>
<br>
<br>
Hope this will give some insight to your issue.<br>
<br>
<br>
<pre class="moz-signature" cols="72">Andrew Parker

</pre>
<br>
Joanne Cook wrote:
<blockquote
 cite="mid:26515565.373951228402300533.JavaMail.root@mail.thehumanjourney.net"
 type="cite">
  <pre wrap="">Hi List,

I have both WMS and WFS layers from a postgres table (starting with WMS but moving to WFS as you zoom in), on top of Microsoft Virtua Earth. You click the WFS points and get a framedcloud popup of the feature attribute data. This aspect works fine, but there is an issue with the alignment of the WFS points. There are some zoom levels where I can see that the WFS layer does not align correctly with the WMS, this is worse at the bottom of the map square and better towards the top. Not only that, the anchor for the popup aligns correctly with the WMS rather than the WFS. So you click on a point and the popup appears next to the correct location rather than where you have clicked.

I assume this is something to do with projections, but I'm a little stuck and would appreciate some assistance. I can't show the map itself because it isn't available to the outside world, but the salient bits of the code are here:

 var map, ve, wms, wfs, drawControls, selectControl, selectedFeature;
        function onPopupClose(evt) {
            selectControl.unselect(selectedFeature);
        }
        function onFeatureSelect(feature) {
          selectedFeature = feature;
                        var projcode = selectedFeature.attributes['projcode'];
                        var sitecode = selectedFeature.attributes['sitecode'];
                        var projnam = selectedFeature.attributes['projnam'];
                        var year = selectedFeature.attributes['year'];
            popup = new OpenLayers.Popup.FramedCloud("info", 
                                     feature.geometry.getBounds().getCenterLonLat(),
                                     null,
                                     "&lt;div style='font-size:.8em'&gt;Project Code: " + projcode +"&lt;br /&gt;Site Code: " + sitecode+"&lt;br /&gt;Project Name: " + projnam + "&lt;br /&gt;Year: " + year + "&lt;/div&gt;",
                                     null, true, onPopupClose);
            feature.popup = popup;
            map.addPopup(popup);
        }
        function onFeatureUnselect(feature) {
            map.removePopup(feature.popup);
            feature.popup.destroy();
            feature.popup = null;
        }    
        function init(){
            map = new OpenLayers.Map('map');
            ve = new OpenLayers.Layer.VirtualEarth( "Virtual Earth",{'type': VEMapStyle.Hybrid});
            wms = new OpenLayers.Layer.WMS("OA Sites WMS", <a class="moz-txt-link-rfc2396E" href="http://10.0.10.106/cgi-bin/mapservpostgis.cgi?">"http://10.0.10.106/cgi-bin/mapservpostgis.cgi?"</a>,
                               {layers: 'oasites', transparent: true, format: 'image/png', buffer:0},
                                {isBaseLayer: false, reproject: true},
                                {scales: [14000000,500000]});
            wfs = new OpenLayers.Layer.WFS("OA Sites WFS", <a class="moz-txt-link-rfc2396E" href="http://10.0.10.106/cgi-bin/mapservpostgis.cgi?">"http://10.0.10.106/cgi-bin/mapservpostgis.cgi?"</a>,
                                {typename: 'oasites', maxfeatures: 200, featureNS: '<a class="moz-txt-link-freetext" href="http://mapserver.gis.umn.edu/mapserver">http://mapserver.gis.umn.edu/mapserver</a>', typename: 'ms:oasites'},
                                {scales: [500000, 10], extractAttributes: true},
                                {style: OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style['default'])});


Thanks

Jo

-----------------------------------------------------
Joanne Cook
Senior IT Support and Development
Oxford Archaeology (North)
01524 880212
<a class="moz-txt-link-freetext" href="http://thehumanjourney.net">http://thehumanjourney.net</a>


------
Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit <a class="moz-txt-link-freetext" href="http://iso26300.info">http://iso26300.info</a> for more information.

_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@openlayers.org">Users@openlayers.org</a>
<a class="moz-txt-link-freetext" href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a>
  </pre>
</blockquote>
</body>
</html>