[OpenLayers-Users] Continuing WFS Trouble, though could be projections...

joanne cook j.cook at oxfordarch.co.uk
Thu Nov 23 04:17:20 EST 2006


Hi All,
 
I have managed to get rid of the errors that occur when I use proxyhost, thanks to Christopher, but I still don't actually get any wfs displaying. The exact same URL works in other viewers. Given that I couldn't get WMS to work either, I'm wondering if this is a projection issue instead. When I look in my apache access.log, I see that the wfs is being called with very small bounding boxes that don't make much sense given where the features actually are, but the correct epsg code is being used for the srs at any rate. My code is below:
 
<script type="text/javascript">
        var lon = 5;
        var lat = 40;
        var zoom = 17;
        var map, layer, options;
        function init(){
            
      OpenLayers.ProxyHost="/cgi-bin/proxy.py?url=";
      map = new OpenLayers.Map( $('map'), {maxExtent: new OpenLayers.Bounds(-700000, -1300000, 700000, 1300000), maxResolution: 'auto', projection:'EPSG:27700', units:'meters'}, 
            { controls: [new OpenLayers.Control.MouseDefaults()] , 'numZoomLevels':20});
            var satellite = new OpenLayers.Layer.Google( "Google Satellite" , {type: G_SATELLITE_MAP, 'maxZoomLevel':18} );
            map.addLayer(satellite);
            
      var oa_sites = new OpenLayers.Layer.WFS( "OA WFS", 
        "http://localhost/cgi-bin/mapserv.exe?map=C:/apache/htdocs/OS_Coverage/OANSiteswfs.map", 
        {typename: 'CALEvents', maxfeatures: 10},
        {featureClass: OpenLayers.Feature.WFS});
        
      
       
      map.addLayer(oa_sites);
            
            map.setCenter(new OpenLayers.LonLat(10.205188,48.857593), 5);
            map.addControl( new OpenLayers.Control.LayerSwitcher() );
            map.addControl( new OpenLayers.Control.PanZoomBar() );
        }   
                
 </script>
 
Any pointers?

Thanks
 
Jo
 
 
-------------------------------------------
Joanne Cook BSc MLitt AIFA MBCS
Information Systems Coordinator
Oxford Archaeology North
-------------------------------------------


This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com



More information about the Users mailing list