[OpenLayers-Users] Hi, all

Micho Gar michogar at gmail.com
Thu Feb 28 07:27:54 EST 2008


Hi, all.

I am trying to make a WMS petition, but I have this error:

[Exception... "'Permission refused on having called to the method
XMLHttpRequest.open' when calling method:
[nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e
(NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]
emptyFunction()OpenLayers.js (line 189)
getImagesLocation()OpenLayers.js (line 101)
emptyFunction()OpenLayers.js (line 189)
dispatch("
http://www.openlayers.org/dev/examples/proxy.cgi?url=http%3A//ovc.catastro.meh.es/Cartografia/WMS/Se..
.", Object method=get)OpenLayers.js (line 191)
Class()OpenLayers.js (line 57)
nullHandler("
http://www.openlayers.org/dev/examples/proxy.cgi?url=http%3A//ovc.catastro.meh.es/Cartografia/WMS/Se..
.", "", Object tileSize=w=256,h=256, setHTML(response), undefined)
OpenLayers.js (line 187)
(no name)(click clientX=0, clientY=0)renta_corp_v_2.ht... (line 94)
remove("click", click clientX=0, clientY=0)OpenLayers.js (line 365)
handleBrowserEvent(click clientX=0, clientY=0)OpenLayers.js (line 367)
bind(click clientX=0, clientY=0)

My code is:
        function init(){
                //Proxy para realizar las peticiones al servicio
                //y me da problemas de permiso
                OpenLayers.ProxyHost = "
http://www.openlayers.org/dev/examples/proxy.cgi?url=";
                //---------------------------------------------------
            map = new OpenLayers.Map( 'map' ,
            { controls: [new OpenLayers.Control.MouseDefaults(),
                            //new OpenLayers.Control.Permalink(),
                                  new OpenLayers.Control.PanZoomBar(),
                                  new OpenLayers.Control.LayerSwitcher(),
                                  new OpenLayers.Control.NavToolbar()] ,
'numZoomLevels':19, projection: 'EPSG:4326', units: "m"});

                        var google = new OpenLayers.Layer.Google( "Google"
,{'maxZoomLevel':19});
            var satellite = new OpenLayers.Layer.Google( "Google Satellite"
, {type: G_HYBRID_MAP, 'maxZoomLevel':19} );
                         var catastro = new OpenLayers.Layer.WMS(
"Catastro", "http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx");
                         //{ format: 'image/png', transparent: 'true',
projection: 'EPSG:4326 WGS 84', units: "m"});
                         marcadores = new OpenLayers.Layer.Markers(
"Situacion" );
            map.addLayer(marcadores);

            //catastro.setOpacity(0.5);
            //catastro.setVisibility(true);

            // funcion para detectar la posicion del cursor
            /*map.events.register("click", map, function(e) {
                    var lonlat = map.getLonLatFromViewPortPx(e.xy);
                    alert("You clicked near " + lonlat.lat + " N, " +
                                              + lonlat.lon + " E");
                });*/

            // funcion para petición al servicio web
            map.events.register('click', map, function (e) {
            //escribe en el div nodeList
            OpenLayers.Util.getElement('nodeList').innerHTML = "Buscando...
por favor espere...";
            var url =  catastro.getFullRequestString({
                            REQUEST: "GetFeatureInfo",
                            BBOX: catastro.map.getExtent().toBBOX(),
                            X: e.xy.x,
                            Y: e.xy.y,
                            INFO_FORMAT: 'text/html',
                            QUERY_LAYERS: catastro.params.LAYERS,
                            WIDTH: catastro.map.size.w,
                            HEIGHT: catastro.map.size.h});
alert(url);
            OpenLayers.loadURL(url, '', this, setHTML);
            OpenLayers.Event.stop(e);
              });

I think is about the proxyhost, but I don´t now make to configure.

Thanks to all.


-- 
# michogar
# Programador SIG
# Ubuntu Linux Counter 462666
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080228/28d73942/attachment.html


More information about the Users mailing list