[OpenLayers-Users] Exception Error
Bart van den Eijnden (OSGIS)
bartvde at osgis.nl
Mon Dec 3 07:46:47 EST 2007
You need a proxy to connect to remote services using AJAX, see:
http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#ProxyHost
Best regards,
Bart
R. Ortner schreef:
> Hi, I´m using some wms layers from an PostGis DB and some wms layers from an
> ArcIMS server.
>
> When I request a getFeatureInfo from the PostGIS DB the Info is displayed
> correctly, when i try to request the getFeatureInfo on the ArcIMS layer i
> get the following errormessage in firebug:
>
> ***************
>
> Line 0[Exception... "'Die Erlaubnis für den Aufruf der Methode
> XMLHttpRequest.open wurde verweigert' when calling method:
> [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e
> (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]
>
> (no name)()Ajax.js (line 139)
> Try()Util.js (line 584)
> getTransport()Ajax.js (line 140)
> initialize("http://gis.ktn.gv.at/wmsconnector/com.esri.wms.Esrimap/geoland2?LAYERS=see&TRANSPARENT=true&SERVICE=...",
> Object method=get)Ajax.js (line 279)
> Class()Class.js (line 32)
> loadURL("http://gis.ktn.gv.at/wmsconnector/com.esri.wms.Esrimap/geoland2?LAYERS=see&TRANSPARENT=true&SERVICE=...",
> "", Object tileSize=w=256,h=256, setHTML(response), undefined)Ajax.js (line
> 71)
> (no name)(click clientX=0, clientY=0)ui7.1.php (line 475)
> triggerEvent("click", click clientX=0, clientY=0)Events.js (line 612)
> handleBrowserEvent(click clientX=0, clientY=0)Events.js (line 640)
> bindAsEventListener(click clientX=0, clientY=0)
>
> ***************
>
> Using the following request:
>
> ###############
>
> function checkinfo(imgid,url,title){
>
> if (infobox == 0) {infobox = 1;}
> if (imgid == oldimgid) {infobox = 0;}
> id = imgid.substring(3,imgid.length);
> if(infobox == 1 && document.getElementById(id).checked==true) {
> document.getElementById('map').style.cursor = 'crosshair';
> document.getElementById(imgid).src = "img/treemenu/identify_2.gif";
> if (oldimgid != null) document.getElementById(oldimgid).src =
> "img/treemenu/identify_1.gif";
> oldimgid = imgid;
> document.getElementById('nodeList').style.visibility = 'visible';
>
> map.events.register('click', map, function (e) {
> if(infobox == 1 && document.getElementById(id).checked==true) {
> document.getElementById('map').style.cursor = 'crosshair';
> OpenLayers.Util.getElement('nodeList').innerHTML = "Loading...
> please wait...";
> var request = window[id].getFullRequestString({
> REQUEST: "GetFeatureInfo",
> EXCEPTIONS: "application/vnd.ogc.se_xml",
> BBOX: window[id].map.getExtent().toBBOX(),
> X: e.xy.x,
> Y: e.xy.y,
> INFO_FORMAT: 'text/html',
> QUERY_LAYERS: window[id].params.LAYERS,
> WIDTH: window[id].map.size.w,
> HEIGHT: window[id].map.size.h});
> OpenLayers.loadURL(request, '', this, setHTML);
> OpenLayers.Event.stop(e);
> }
> });
> }
> else {
> document.getElementById('map').style.cursor = 'auto';
> document.getElementById('nodeList').style.visibility = 'hidden';
> if (imgid == oldimgid) { oldimgid = null; } else { oldimgid = imgid;
> }
> document.getElementById('nodeList').innerHTML = "";
> infobox = 0;
> document.getElementById(imgid).src = "img/treemenu/identify_1.gif";
> }
> }
>
> function setHTML(response) {
> OpenLayers.Util.getElement('nodeList').innerHTML = response.responseText;
> //response.response.Text kann nur UTF8 darstellen/ für ISO 8... ist
> response.responseXML
> }
>
> ###############
>
> Any idea whats wrong?
> thx
>
>
--
Bart van den Eijnden
OSGIS, Open Source GIS
bartvde at osgis.nl
http://www.osgis.nl
More information about the Users
mailing list