Hi!
I wrote an html page to edit and display features in my GeoServer using OpenLayers, WFS-T and WMS.
My applications works as following:
1. I can draw trought WFS-T points, lines and polygons displaying as background GOOGLE_HYBRID MAP
2. Features are in PostGIS with 4326 proj
Now, I'd like to query my features with GetFeatureInfo so I need to display them trought WMS. So I draw WFS layer and I display the same layer as WMS in order to query it.
A part of displaying problems due to projection of Google layer (projection: "EPSG:900913" - at the moment my map is 4326), I am not able to query my layer after adding this code (wms is my layer):
// support GetFeatureInfo
map.events.register('click', map, function (e) {
OpenLayers.Util.getElement('nodeList').innerHTML = "Loading... please wait...";
var url = wms.getFullRequestString({
REQUEST: "GetFeatureInfo",
EXCEPTIONS: "application/vnd.ogc.se_xml",
BBOX: wms.map.getExtent().toBBOX(),
X: e.xy.x,
Y: e.xy.y,
INFO_FORMAT: 'text/html',
QUERY_LAYERS: wms.params.LAYERS,
WIDTH: wms.map.size.w,
HEIGHT: wms.map.size.h});
OpenLayers.loadURL(url, '', this, setHTML);
OpenLayers.Event.stop(e);
});
// sets the HTML provided into the nodelist element
function setHTML(response) {
OpenLayers.Util.getElement('nodeList').innerHTML = response.responseText;
}
The error is:
[Exception... "'Permesso negato al metodo di chiamata XMLHttpRequest.open' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]
It seems the response in null ... but why?
Thanks
--
Ing. Fabio D'Ovidio
INOVA Open Solutions s.r.l.
Web : http://www.inovaos.it
Tel.: 081 197 57 600
mail: fabiodovidio@anonymised.com
Fabio D'Ovidio ha scritto:
...
The error is:
[Exception... "'Permesso negato al metodo di chiamata XMLHttpRequest.open' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]
It seems the response in null ... but why?
Usually this happens when your javascript is served by a
different host/port than the server you're querying due
to sandbox restrictions but... you are already able to use
WFS-T, so I'm surprised... unless the WMS you're trying to
query is a host other than GeoServer?
If you don't get a good response here, try also on OL-users,
since this falls more in the javascript-hackers knowledge
than in ours
Cheers
Andrea
Hi Andrea.
I read here:
http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#WhydoIneedaProxyHost
I am using the same webserver used by geoserver with the same port...
I'll try to ask also to OL-users.
Thanks a lot !!
--
Ing. Fabio D'Ovidio
INOVA Open Solutions s.r.l.
Web : http://www.inovaos.it
Tel.: 081 197 57 600
mail: fabiodovidio@anonymised.com
Andrea Aime ha scritto:
Fabio D'Ovidio ha scritto:
...
The error is:
[Exception... "'Permesso negato al metodo di chiamata XMLHttpRequest.open' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]
It seems the response in null ... but why?
Usually this happens when your javascript is served by a
different host/port than the server you're querying due
to sandbox restrictions but... you are already able to use
WFS-T, so I'm surprised... unless the WMS you're trying to
query is a host other than GeoServer?
If you don't get a good response here, try also on OL-users,
since this falls more in the javascript-hackers knowledge
than in ours
Cheers
Andrea
Sometimes you get the same error if you load in the browser the file directly from the HD. You need to publish the HTML in the server to see it working.
On Mon, Jun 30, 2008 at 12:39 PM, Fabio D’Ovidio <fabiodovidio@anonymised.com> wrote:
Hi Andrea.
I read here:
http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#WhydoIneedaProxyHost
I am using the same webserver used by geoserver with the same port…
I’ll try to ask also to OL-users.
Thanks a lot !!
–
Ing. Fabio D’Ovidio
INOVA Open Solutions s.r.l.
Web : http://www.inovaos.it
Tel.: 081 197 57 600
mail: fabiodovidio@anonymised.com
Andrea Aime ha scritto:
Fabio D’Ovidio ha scritto:
…
The error is:
[Exception… “‘Permesso negato al metodo di chiamata
XMLHttpRequest.open’ when calling method:
[nsIDOMEventListener::handleEvent]” nsresult: “0x8057001e
(NS_ERROR_XPC_JS_THREW_STRING)” location: “” data: no]
It seems the response in null … but why?
Usually this happens when your javascript is served by a
different host/port than the server you’re querying due
to sandbox restrictions but… you are already able to use
WFS-T, so I’m surprised… unless the WMS you’re trying to
query is a host other than GeoServer?
If you don’t get a good response here, try also on OL-users,
since this falls more in the javascript-hackers knowledge
than in ours
Cheers
Andrea
Check out the new SourceForge.net Marketplace.
It’s the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
–
Eng. Alessio Fabiani
Vice-President /CTO GeoSolutions S.A.S.
Via Carignoni 51
55041 Camaiore (LU)
Italy
phone: +39 0584983027
fax: +39 0584983027
mob: +39 349 8227000
http://www.geo-solutions.it