Continuing WFS Trouble, though could be projections...

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Continuing WFS Trouble, though could be projections...

JoCook
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
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Continuing WFS Trouble, though could be projections...

Christopher Schmidt-2
On Thu, Nov 23, 2006 at 09:17:20AM -0000, joanne cook wrote:
> 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:

It is not currently possible to use map layers in two different
projections. When using Google Maps as a base layer, you can only
use unprojected lat/long as the projection of your overlays.

Adding client-side reprojection support is not on the short term list of
features for OpenLayers -- it may come in at some point, but it would be
a signficant change, and I'm not willing to commit to making it yet.

If you change your base layer from being a Google layer to being a WMS
layer, it seems like the code you have should work properly. If you are
having problems getting WMS to work in this setup, please paste the same
information back, and we can further examine the possible problems
behind it.

Regards (and Happy Thanksgiving!),
--
Christopher Schmidt
MetaCarta
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Continuing WFS Trouble, though could be projections...

JoCook
In reply to this post by JoCook
Hi Christopher et al,
 
Thanks for this- it worked (when I found a wms layer that would work with EPSG:27700). I think I had misread some of the information about version 2.2 and had decided that it was possible to do what I was trying. I think I will have to get my data projected in EPSG:4326 so I too can have shiny google/metacarta goodness. Anyhow, a result, finally!
 
Many thanks
 
Jo
 
-------------------------------------------
Joanne Cook BSc MLitt AIFA MBCS
Information Systems Coordinator
Oxford Archaeology North
-------------------------------------------

________________________________

From: Christopher Schmidt [mailto:[hidden email]]
Sent: Thu 23/11/2006 14:54
To: joanne cook
Cc: [hidden email]
Subject: Re: [OpenLayers-Users] Continuing WFS Trouble, though could be projections...



On Thu, Nov 23, 2006 at 09:17:20AM -0000, joanne cook wrote:
> 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:

It is not currently possible to use map layers in two different
projections. When using Google Maps as a base layer, you can only
use unprojected lat/long as the projection of your overlays.

Adding client-side reprojection support is not on the short term list of
features for OpenLayers -- it may come in at some point, but it would be
a signficant change, and I'm not willing to commit to making it yet.

If you change your base layer from being a Google layer to being a WMS
layer, it seems like the code you have should work properly. If you are
having problems getting WMS to work in this setup, please paste the same
information back, and we can further examine the possible problems
behind it.

Regards (and Happy Thanksgiving!),
--
Christopher Schmidt
MetaCarta







This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users