Hi Bill Check this: <http://faq.openlayers.org/wfs/why-isnt-wfs-working-on-my-local-checkout-of-openlayers/>.
-- Eric On Mon, Jan 12, 2009 at 11:30 PM, Bill Thoen <bth...@gisnet.com> wrote: > I'm trying to get a layer of lines to open as a WFS layer and I'm > getting this error: > > uncaught exception: Permission denied to call method XMLHttpRequest.open > > When I issue a GetRequest directly to the server via the browser url > window, I get an XML file with all the expected data. But when I try to > open it with OpenLayers I get this error and no lines show up. Does > anyone know what's wrong and how to fix it? > > The server is Mapserver 4.10.0 and I'm using OpenLayers 2.7. The > relevant part of the script looks like this: > ... > <script type="text/javascript"> > var map; > var wms; > var wfs; > > function init() { > map = new OpenLayers.Map( 'map' ); > map.addControl( new OpenLayers.Control.LayerSwitcher()); > > wms = new OpenLayers.Layer.WMS ( > "States", > "http://192.168.0.250/cgi-bin/mapserv?map=base.map", > { layers:"us_states" } > ); > map.addLayer( wms ); > > wfs = new OpenLayers.Layer.WFS ( > "Pipes", > "http://192.168.0.250/cgi-bin/piper_wfs", > { typename: "ms:pipes"} > ); > map.addLayer( wfs ); > map.setCenter( new OpenLayers.LonLat(-108.5,42.5), 7); > } > </script> > ... > > The relevant part of the MapServer WFS map file looks like this: > MAP > SIZE 840 700 > EXTENT -125 30 -65 50 > UNITS DD > SHAPEPATH /var/www/maps/data/ > FONTSET /var/www/maps/fonts/fonts.txt > SYMBOLSET "/var/www/maps/symbols/symbols.txt" > > WEB > TEMPLATE "/var/www/html/piper/test.html" > IMAGEPATH "/var/www/html/tmp/" > IMAGEURL "/tmp/" > METADATA > "wfs_title" "Piper WFS Layers" > "wfs_onlineresource" "http://192.168.0.250/cgi-bin/mapserv?" > "wfs_srs" "EPSG:4326" > END > END > > PROJECTION > "init=epsg:4326" > END > > LAYER > NAME pipes > METADATA > "wfs_title" "pipes" > "gml_featureid" "arc_id" > "gml_include_items" "all" > END > TYPE LINE > STATUS ON > CONNECTIONTYPE POSTGIS > CONNECTION "user=bthoen dbname=piper host=192.168.0.250 port=5432" > DATA "the_geom from pipes" > DUMP TRUE > PROJECTION > "init=epsg:4326" > END > CLASS > NAME pipes > COLOR 0 0 0 > END > END > ... > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users