<div dir="ltr">All,<div><br></div><div style>I am new to OpenLayers but have been using MapGuide for several years. I had originally posted the below post to MapGuide list because I thought it was a MapGuide related connection issue.</div>
<div style><br></div><div style><a href="http://osgeo-org.1560.x6.nabble.com/WFS-Connection-from-OpenLayers-td5060185.html">http://osgeo-org.1560.x6.nabble.com/WFS-Connection-from-OpenLayers-td5060185.html</a><br></div><div style>
<br></div><div style>Since then (as you can see in my update) I have found some help from the example <a href="http://openlayers.org/dev/examples/getfeature-wfs.html">http://openlayers.org/dev/examples/getfeature-wfs.html</a>. With the help of this, I was able to make a connection (so I think). <span style="color:rgb(0,0,0);font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px">Both layers show up in the Layers panel as it</span><span style="color:rgb(0,0,0);font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px"> </span><span class="" style="color:rgb(0,0,0);font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px;font-weight:bold;background-color:rgb(255,255,153)">is</span><span style="color:rgb(0,0,0);font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px"> </span><span style="color:rgb(0,0,0);font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px">added to the map, but the WMS layer shows up and the created WFS does</span><span style="color:rgb(0,0,0);font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px"> </span><span class="" style="color:rgb(0,0,0);font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px;font-weight:bold;background-color:rgb(255,255,153)">not</span><span style="color:rgb(0,0,0);font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px">.  Now I don't know if it is MapGuide related or OpenLayers related. Code below:</span></div>
<span style="color:rgb(0,0,0);font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px"></span><div style="color:rgb(0,0,0);font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px"><br></div><div style="color:rgb(0,0,0);font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px">
<div><i>var wmsParcels = new OpenLayers.Layer.WMS("Parcels",</i></div><div><i>        "<a href="http://localhost/mapguide/mapagent/mapagent.fcgi?USERNAME=Administrator&Password=admin" target="_top" rel="nofollow" link="external" style="font-size:1em;color:rgb(85,26,139)"><span style="color:inherit">http://localhost/mapguide/mapagent/mapagent.fcgi?USERNAME=Administrator&Password=admin</span></a>",</i></div>
<div><i>        { layers: 'Samples/Sheboygan/Layers/Parcels', transparent: true },</i></div><div><i>        { <span class="" style="font-weight:bold;background-color:rgb(255,255,153)">isBaseLayer</span>: false, transitionEffect: 'resize', format: 'image/png' }</i></div>
<div><i>        //{ projection: new OpenLayers.Projection('EPSG:900913') }</i></div><div><i>    );</i></div><div><i><br></i></div><div><i>map.addLayer(wmsParcels);<br></i></div><div><i><br></i></div><div><i>var wfsParcels = new OpenLayers.Layer.Vector("WFS Parcels", { protocol: new OpenLayers.Protocol.WFS.fromWMSLayer(wmsParcels) });<br>
</i></div><div><i><br></i></div><div><i>map.addLayers([select, wfsParcels]);</i><br></div><div><br></div><div>With this there are no errors showing up in Chrome Developer tools.</div><div><br></div><div style>As a related issue, when I use the above code, I get the error below if I use the <i>OpenLayers.movile.js</i> script instead of the <i>OpenLayers.js?mobile </i>script.</div>
<div style><br></div><div style>Error:</div><div style><ol class="" tabindex="0" style="font-size:12px;list-style-type:none;margin:0px;outline:none;padding-left:0px;line-height:12px;font-family:Consolas,'Lucida Console',monospace">
<li title="" class="" style="padding:0px 0px 0px 14px;margin-top:1px;word-wrap:break-word"><span class="" style="white-space:pre-wrap;color:red!important"><span style>Uncaught Unsupported WFS version: 1.1.0</span> <a href="file:///Z:/MapGuideProjects/MobileGIS/RBAC%20Mobile%20GIS/OpenLayers.mobile.js" class="" title="file:///Z:/MapGuideProjects/MobileGIS/RBAC%20Mobile%20GIS/OpenLayers.mobile.js:515" style="float:right;text-align:right;max-width:100%;margin-left:4px;color:rgb(84,84,84)">OpenLayers.mobile.js:515</a></span></li>
<ol class="" style="margin:0px;min-width:100%;list-style-type:none;font-size:inherit;padding:0px 0px 0px 12px!important"><li title="" class="" style="padding:0px 0px 0px 14px;margin-top:1px;word-wrap:break-word"><div style>
<span class="" style="white-space:pre-wrap;color:red!important">OpenLayers.Protocol.WFS</span><a href="file:///Z:/MapGuideProjects/MobileGIS/RBAC%20Mobile%20GIS/OpenLayers.mobile.js" class="" title="file:///Z:/MapGuideProjects/MobileGIS/RBAC%20Mobile%20GIS/OpenLayers.mobile.js:515" style="float:right;text-align:right;max-width:100%;margin-left:4px;color:rgb(84,84,84)">OpenLayers.mobile.js:515</a></div>
</li><li title="" style="padding:0px 0px 0px 14px;margin-top:1px;word-wrap:break-word"><div style><span class="" style="white-space:pre-wrap;color:red!important">OpenLayers.Protocol.WFS.fromWMSLayer</span><a href="file:///Z:/MapGuideProjects/MobileGIS/RBAC%20Mobile%20GIS/OpenLayers.mobile.js" class="" title="file:///Z:/MapGuideProjects/MobileGIS/RBAC%20Mobile%20GIS/OpenLayers.mobile.js:516" style="float:right;text-align:right;max-width:100%;margin-left:4px;color:rgb(84,84,84)">OpenLayers.mobile.js:516</a></div>
</li><li title="" style="padding:0px 0px 0px 14px;margin-top:1px;word-wrap:break-word"><div style><span class="" style="white-space:pre-wrap;color:red!important">init</span><a href="file:///Z:/MapGuideProjects/MobileGIS/RBAC%20Mobile%20GIS/Scripts/mobile-rbac.js" class="" title="file:///Z:/MapGuideProjects/MobileGIS/RBAC%20Mobile%20GIS/Scripts/mobile-rbac.js:149" style="float:right;text-align:right;max-width:100%;margin-left:4px;color:rgb(84,84,84)">mobile-rbac.js:149</a></div>
</li><li title="" style="padding:0px 0px 0px 14px;margin-top:1px;word-wrap:break-word"><div style><span class="" style="white-space:pre-wrap;color:red!important">fixContentHeight</span><a href="file:///Z:/MapGuideProjects/MobileGIS/RBAC%20Mobile%20GIS/Scripts/mobile-jq.js" class="" title="file:///Z:/MapGuideProjects/MobileGIS/RBAC%20Mobile%20GIS/Scripts/mobile-jq.js:24" style="float:right;text-align:right;max-width:100%;margin-left:4px;color:rgb(84,84,84)">mobile-jq.js:24</a></div>
</li></ol></ol></div><div style><br></div></div><div style><br></div><div style>Any thoughts?</div><div style><br></div><div style>Thanks,</div><div style>Rich</div></div>