Garthanos / geoxml

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

geoxml not parsing php generated kml in IE #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use a .php that generates a .kml instead of the .kml

What is the expected output? What do you see instead?
The expected putput is a parsed kml, the kml generated from the php script
is not parsed ONLY in IE....in FF it works!

What version of the product are you using? On what operating system?
15 May 2009 version! (I also tried on older versions with the same result!
:/) on WinXP with IE6,7 and 8 (same result for all 3 of them!)

Please provide any additional information below.
I used IE to execute the .php and i downloaded the produced .kml
used it in the new GeoXml declaration instead of the .php and it works...
I also tryed appending on the .php a new GET variable a=.kml but with no
success...the .php is not parsed! :/

Original issue reported on code.google.com by alex.sosic on 15 Sep 2009 at 10:41

GoogleCodeExporter commented 9 years ago
I have used php as the source of data for GeoXml a number of times without 
issues.

Here is a clue. GeoXml uses the built in parsing mechanism for xml and ie is 
rather
prone to character encoding issues.. Your web server when you post a static xml
presents the xml with a mimetype and character encoding usually a default utf-8 
(and
ignores anything that is set in the xml).

I cant see what your php is doing...

Original comment by lanceala...@gmail.com on 17 Sep 2009 at 3:23

GoogleCodeExporter commented 9 years ago
It was a header MIME type problem...

I solved it with this change:
++header('Content-type: application/vnd.google-earth.kml+xml'); 
--header("Content-Type: application/vnd.google-earth.kml+xml kml; 
charset=utf8");

Original comment by alex.sosic on 17 Sep 2009 at 3:25

GoogleCodeExporter commented 9 years ago
great.

Original comment by lanceala...@gmail.com on 17 Sep 2009 at 9:16