A while ago, I had this fiddle working thanks to stackoverflow : http://jsfiddle.net/AUbZn/16/ Now it's not anymore :/
Seems that for whatever reason, the request is being sent to yahoo in OPTION method. This is the relevant part, as this url is being option'ed :
var layer = new OpenLayers.Layer.Vector("GML", {
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.HTTP({
url: "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20xml%20where%20url%3D'http%3A%2F%2Fopenlayers.org%2Fdev%2Fexamples%2Fgml%2Fpolygon.xml'",
format: new OpenLayers.Format.GML(),
}),
eventListeners: {
"featuresadded": dataLoaded
},
});
Any idea why and how to correct it ?