[OpenLayers-Users] GeoServer Proxy Extension OpenLayers

Pedro Baracho pedropbaracho at gmail.com
Mon Nov 16 14:48:19 EST 2009


In fact, changing the security settings won't solve the problem if you are
accessing it via file://

On Mon, Nov 16, 2009 at 5:39 PM, Pedro Baracho <pedropbaracho at gmail.com>wrote:

> What is the link on your browser when you open the example?
>
> is it http:// ... or file:// ?
>
> That message from IE is exactly the Cross Domain AJAX Request thing. You
> can set the Security config of IE to None also. I think that will solve the
> problem for IE.
>
> Cheers
>
>
> On Mon, Nov 16, 2009 at 5:20 PM, stash <steffen.schwarz85 at googlemail.com>wrote:
>
>>
>>
>>
>> Andreas Hocevar-2 wrote:
>> >
>> >
>> > Only if you provide more context:
>> >
>> > * the code of the example you are trying to run
>> > * the url you are accessing it through
>> >
>> >
>>
>> Hello,
>> yes I think this is the best idea to solve my problem. I use the following
>> code. It's a wms (my base layer) with a background card and a wfs with
>> some
>> points located somewhere in denmark.
>>
>> <html xmlns="http://www.w3.org/1999/xhtml">
>>  <head>
>>    <link rel="stylesheet" href="OpenLayers-2.8/theme/default/style.css"
>> type="text/css" />
>>    <link rel="stylesheet" href="style.css" type="text/css" />
>>    <script src="OpenLayers-2.8/lib/OpenLayers.js"></script>
>>    <script type="text/javascript">
>>        var map, layer;
>>
>>        function init(){
>>             OpenLayers.ProxyHost="/geoserver/rest/proxy?url=";
>>
>>  var max_Extent = new OpenLayers.Bounds(
>>                    -198, -98.68117980957031,
>>                    198, 92.30477600097656
>>                );
>>
>>                var bounds = new OpenLayers.Bounds(
>>                    1, 45,
>>                    16, 60
>>                );
>>
>>                var options = {
>>                    controls: [],
>>                    maxExtent: max_Extent,
>>                    maxResolution: 0.5,
>>                    projection: "EPSG:4326",
>>                    units: 'degrees'
>>
>>                };
>>
>>                map = new OpenLayers.Map('map', options);
>>
>>
>>            layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
>>            "http://localhost:8080/geoserver/wms", {layers:
>> 'topp:country'}
>> );
>>            map.addLayer(layer);
>>
>>            layer = new OpenLayers.Layer.WFS( "Owl Survey",
>>                "http://localhost:8080/geoserver/wfs",
>>                {typename: "topp:MY_GAZETTEER", maxfeatures: 10},
>>                { featureClass: OpenLayers.Feature.WFS});
>>            map.addLayer(layer);
>>            map.addControl(new OpenLayers.Control.LayerSwitcher());
>>
>> map.zoomToExtent(bounds);
>>        }
>>    </script>
>>  </head>
>>  <body onload="init()">
>>    <h1 id="title">WFS Points</h1>
>>    <p id='shortdesc'>
>>      Using a Layer.WFS with a featureClass, one can take in XML data
>>      from a WFS class and display it any way you like.
>>    </p>
>>    <div id="map" class="smallmap"></div>
>>  </body>
>> </html>
>>
>> The wms is working, the wfs not. My browser (Internet explorer) tells me
>> an
>> error at the xmlhttprequest (Access denied).
>>
>> Thanks for your help.
>>
>> Best regards
>> stash
>>
>> --
>> View this message in context:
>> http://n2.nabble.com/GeoServer-Proxy-Extension-OpenLayers-tp3998936p4014088.html
>> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091116/9021e317/attachment.html


More information about the Users mailing list