Pages: 1
- Sujet précédent - [OpenLayers] GetFeatureInfo et INFO_FORMAT: 'application/vnd.ogc.gml' - Sujet suivant
#1 Thu 18 June 2009 19:45
[OpenLayers] GetFeatureInfo et INFO_FORMAT: 'application/vnd.ogc.gml'
Bonjour,
J'ai une couche WMS et une requête getfeatureinfo effectuée sur celle-ci.
Je ne souhaite afficher que certaines informations lors du clic sur la carte, concernant cette couche.
J'ai donc mis en paramètre INFO_FORMAT: 'application/vnd.ogc.gml' (j'avais essayé auparavant le format txt/xml mais geoserver me retournait une erreur).
Le serveur me retourne bien la réponse mais il m'est impossible de la parser...
cet utilisateur, ici, a été confronté au même problème...
Auriez-vous une idée d'où cela pourrait venir?
Voici mon code:
Code:
Code:
[...]
map.events.register('click', map, function (e) {
var params = {
REQUEST: "GetFeatureInfo",
EXCEPTIONS: "application/vnd.ogc.se_xml",
BBOX: map.getExtent().toBBOX(),
X: e.xy.x,
Y: e.xy.y,
INFO_FORMAT: 'application/vnd.ogc.gml',
QUERY_LAYERS: map.layers[0].params.LAYERS,
FEATURE_COUNT: 50,
Srs: 'EPSG:27574',
Styles: '',
Layers: 'topp:Access-Geo_AnalyseCommunes2',
WIDTH: map.size.w,
HEIGHT: map.size.h,
format: 'image/png'};
OpenLayers.loadURL("http://localhost:8080/geoserver/wms", params, this, sethtml, sethtml);
OpenLayers.Event.stop(e);
});
function sethtml(req){
//req.responseXML me retourne "null"
}
[...]Merci!
Réponse avec citation
geodata au cerema et petits billets en géomatique
Hors ligne
Pages: 1
- Sujet précédent - [OpenLayers] GetFeatureInfo et INFO_FORMAT: 'application/vnd.ogc.gml' - Sujet suivant


