Oh thanks!!!
I don't know why but this line in obtenerInmobiliarias.php caused the
error:
header ('Content-type: ' . isset($_GET['debug'])?'text/
xml':'application/vnd.google-earth.kml+xml');
extracting the isset... to another external variable solved it:
$contentType = isset($_GET['debug'])?"text/xml":"application/
vnd.google-earth.kml+xml";
header ("Content-type: $contentType");
I still don't know the why but thanks again
On 29 sep, 13:23, Marcelo <[email protected]> wrote:
> Either your server, or PHP, are sending the wrong header.
> The KML file is being served with "Content-Type: text/html".
>
> Note that maps.google.com cannot load it either.
>
> --
> Marcelo -http://maps.forum.nu
> --
>
> On Sep 29, 2:45 pm, joarobles <[email protected]> wrote:
>
> > Hi people, I've just had this problem while trying to load a KML file
> > hosted in my server with GGeoXML...
>
> > I use the following code to load the map and the KML file:
>
> > <script src="http://maps.google.com/maps?
> > file=api&v=2&oe=utf-8&key=MY_KEY" type="text/javascript"></script>
> > function load() {
> > if (GBrowserIsCompatible()) {
> > map = new GMap2(document.getElementById("mapa"));
> > map.setCenter(new GLatLng(-31.39849866445887,
> > -64.18264389038086), 12);
> > map.setUIToDefault();
>
> > var geoXml = new
> > GGeoXml("http://www.cordobalquila.com.ar/kml/
> > obtenerInmobiliarias.php?"+Math.random());
> > map.addOverlay(geoXml);
>
> > }
>
> > }
>
> > The location of this example is the
> > following:www.cordobalquila.com.ar/inmobiliarias
>
> > And the KML file is this
> > one:www.cordobalquila.com.ar/kml/obtenerInmobiliarias.php
>
> > This file was being loaded OK till now, but it stopped loading! Now it
> > shows nothing...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en
-~----------~----~----~----~------~----~------~--~---