Hi, all. <br><br>I am trying to make a WMS petition, but I have this error:<br><br><div class="errorTitle">[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]</div><div class="objectBox objectBox-stackFrame"><a class="objectLink">emptyFunction</a>()<span class="objectLink-sourceLink objectLink">OpenLayers.js (line 189)</span></div><div class="objectBox objectBox-stackFrame">
<a class="objectLink">getImagesLocation</a>()<span class="objectLink-sourceLink objectLink">OpenLayers.js (line 101)</span></div><div class="objectBox objectBox-stackFrame"><a class="objectLink">emptyFunction</a>()<span class="objectLink-sourceLink objectLink">OpenLayers.js (line 189)</span></div>
<div class="objectBox objectBox-stackFrame"><a class="objectLink">dispatch</a>(<span class="objectBox objectBox-string">"<a href="http://www.openlayers.org/dev/examples/proxy.cgi?url=http%3A//ovc.catastro.meh.es/Cartografia/WMS/Se..">http://www.openlayers.org/dev/examples/proxy.cgi?url=http%3A//ovc.catastro.meh.es/Cartografia/WMS/Se..</a>."</span><span class="arrayComma">, </span><a class="objectLink objectLink-object"><span class="objectTitle">Object</span> method=<span class="objectPropValue">get</span></a><span class="arrayComma"></span>)<span class="objectLink-sourceLink objectLink">OpenLayers.js (line 191)</span></div>
<div class="objectBox objectBox-stackFrame"><a class="objectLink">Class</a>()<span class="objectLink-sourceLink objectLink">OpenLayers.js (line 57)</span></div><div class="objectBox objectBox-stackFrame"><a class="objectLink">nullHandler</a>(<span class="objectBox objectBox-string">"<a href="http://www.openlayers.org/dev/examples/proxy.cgi?url=http%3A//ovc.catastro.meh.es/Cartografia/WMS/Se..">http://www.openlayers.org/dev/examples/proxy.cgi?url=http%3A//ovc.catastro.meh.es/Cartografia/WMS/Se..</a>."</span><span class="arrayComma">, </span><span class="objectBox objectBox-string">""</span><span class="arrayComma">, </span><a class="objectLink objectLink-object"><span class="objectTitle">Object</span> tileSize=<span class="objectPropValue">w=256,h=256</span></a><span class="arrayComma">, </span><a class="objectLink objectLink-function">setHTML(response)</a><span class="arrayComma">, </span><span class="objectBox objectBox-undefined">undefined</span><span class="arrayComma"></span>)<span class="objectLink-sourceLink objectLink">OpenLayers.js (line 187)</span></div>
<div class="objectBox objectBox-stackFrame"><a class="objectLink">(no name)</a>(<a class="objectLink objectLink-object">click clientX=0, clientY=0</a><span class="arrayComma"></span>)<span class="objectLink-sourceLink objectLink">renta_corp_v_2.ht... (line 94)</span></div>
<div class="objectBox objectBox-stackFrame"><a class="objectLink">remove</a>(<span class="objectBox objectBox-string">"click"</span><span class="arrayComma">, </span><a class="objectLink objectLink-object">click clientX=0, clientY=0</a><span class="arrayComma"></span>)<span class="objectLink-sourceLink objectLink">OpenLayers.js (line 365)</span></div>
<div class="objectBox objectBox-stackFrame"><a class="objectLink">handleBrowserEvent</a>(<a class="objectLink objectLink-object">click clientX=0, clientY=0</a><span class="arrayComma"></span>)<span class="objectLink-sourceLink objectLink">OpenLayers.js (line 367)</span></div>
<div class="objectBox objectBox-stackFrame"><a class="objectLink">bind</a>(<a class="objectLink objectLink-object">click clientX=0, clientY=0</a><span class="arrayComma"></span>)</div><br clear="all">My code is:<br> function init(){<br>
//Proxy para realizar las peticiones al servicio <br> //y me da problemas de permiso<br> OpenLayers.ProxyHost = "<a href="http://www.openlayers.org/dev/examples/proxy.cgi?url=">http://www.openlayers.org/dev/examples/proxy.cgi?url=</a>";<br>
//---------------------------------------------------<br> map = new OpenLayers.Map( 'map' ,<br> { controls: [new OpenLayers.Control.MouseDefaults(),<br> //new OpenLayers.Control.Permalink(),<br>
new OpenLayers.Control.PanZoomBar(),<br> new OpenLayers.Control.LayerSwitcher(),<br> new OpenLayers.Control.NavToolbar()] , 'numZoomLevels':19, projection: 'EPSG:4326', units: "m"});<br>
<br> var google = new OpenLayers.Layer.Google( "Google" ,{'maxZoomLevel':19});<br> var satellite = new OpenLayers.Layer.Google( "Google Satellite" , {type: G_HYBRID_MAP, 'maxZoomLevel':19} );<br>
var catastro = new OpenLayers.Layer.WMS( "Catastro", "<a href="http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx">http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx</a>");<br>
//{ format: 'image/png', transparent: 'true', projection: 'EPSG:4326 WGS 84', units: "m"});<br> marcadores = new OpenLayers.Layer.Markers( "Situacion" );<br>
map.addLayer(marcadores);<br> <br> //catastro.setOpacity(0.5);<br> //catastro.setVisibility(true);<br> <br> // funcion para detectar la posicion del cursor<br>
/*map.events.register("click", map, function(e) {<br> var lonlat = map.getLonLatFromViewPortPx(e.xy);<br> alert("You clicked near " + lonlat.lat + " N, " +<br>
+ lonlat.lon + " E");<br> });*/<br> <br> // funcion para petición al servicio web<br> map.events.register('click', map, function (e) {<br>
//escribe en el div nodeList<br> OpenLayers.Util.getElement('nodeList').innerHTML = "Buscando... por favor espere...";<br> var url = catastro.getFullRequestString({<br>
REQUEST: "GetFeatureInfo",<br> BBOX: catastro.map.getExtent().toBBOX(),<br> X: e.xy.x,<br> Y: e.xy.y,<br>
INFO_FORMAT: 'text/html',<br> QUERY_LAYERS: catastro.params.LAYERS,<br> WIDTH: catastro.map.size.w,<br> HEIGHT: catastro.map.size.h});<br>
alert(url);<br> OpenLayers.loadURL(url, '', this, setHTML);<br> OpenLayers.Event.stop(e);<br> });<br><br>I think is about the proxyhost, but I don´t now make to configure.<br><br>
Thanks to all.<br><br><br>-- <br># michogar<br># Programador SIG<br># Ubuntu Linux Counter 462666