vonguillo / geoxml3

Automatically exported from code.google.com/p/geoxml3
0 stars 0 forks source link

Force xhrFetcher MIME type to 'text/html' #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On the production (Google App Engine) server, when fetiching a kml file, 
xhrFetcher.responseXML was null (on a perfectly fine XML response).
I've looked at the response and the MIME type was set to octect-stream.
So I forced it to 'text/xml' and the problem went away:

    xhrFetcher.overrideMimeType('text/xml');
    xhrFetcher.open('GET', url, true);
    ...

Original issue reported on code.google.com by theb...@emanueleziglioli.it on 17 May 2011 at 5:00

GoogleCodeExporter commented 9 years ago
Does your fix work in IE?

http://robert.accettura.com/blog/2006/12/02/xmlhttpreqoverridemimetype-in-ie7/

Original comment by geocodezip on 18 May 2011 at 6:40

GoogleCodeExporter commented 9 years ago
I've looked at your link and the problem seems to affect only IE7.
I'm having other problems with IE8 and 9 that prevent me from checking whether 
my fix works.
It reminds me I should be trying with IE more often...

Original comment by theb...@emanueleziglioli.it on 18 May 2011 at 10:01

GoogleCodeExporter commented 9 years ago
looks like you might be using an obsolete version of the code. That piece looks 
like this in the polys branch:
  xhrFetcher.fetcher.open('GET', url, true);

Original comment by geocodezip on 22 May 2011 at 4:40

GoogleCodeExporter commented 9 years ago
fixed in polys branch revision 56

Original comment by geocodezip on 22 May 2011 at 4:59

GoogleCodeExporter commented 9 years ago
I've noticed the poly branch is significantly different from trunk.
There I see you parse the text response, rather than using the xml one.
I'll use the poly branch from now on. Thx!

Original comment by theb...@emanueleziglioli.it on 22 May 2011 at 8:51

GoogleCodeExporter commented 9 years ago
From the project home page:
http://code.google.com/p/geoxml3/

History
trunk - original version
network_link branch - development branch for network link functionality, not 
well tested
polys branch - development branch for polylines, polygons, current active 
development branch. Supports polylines, polygons, markers and groundoverlays

Original comment by geocodezip on 22 May 2011 at 10:05

GoogleCodeExporter commented 9 years ago
in revision 56 the problem have not been solved:

xhrFetcher.fetcher.open('GET', url, true);

xhrFetcher.fetcher.send(null);

Original comment by maoting0...@yahoo.cn on 14 Sep 2011 at 7:08

GoogleCodeExporter commented 9 years ago
Please use the polys branch, not the trunk.
See this comment earlier in this issue:
http://code.google.com/p/geoxml3/issues/detail?id=29#c3
(and the following comment "fixed in polys branch revision 56"

Original comment by geocodezip on 14 Sep 2011 at 8:51