KML can't display sometimes and about 304 return

53 views
Skip to first unread message

胡帝

unread,
Nov 5, 2011, 9:57:20 PM11/5/11
to KML Developer Support - KML Server Side Scripting
Hi, there is a question troubled me for a long time. Is there somebody
can help me.

Usually, when I first creat a new kmlLayer and want to show it on map.
KML SERVER return:
_xdc_._qcn0gb && _xdc_._qcn0gb( [0,"kml:... ..."]]] )
and I can show the kmlLayer.
when I creat same kmlLayer after then. SERVR return: HTTP/1.1 304 Not
Modified.
that's good.

But, Sometimes, when I creat a new kmlLayer, SERVRE return:
_xdc_._m8b7fh && _xdc_._m8b7fh( [1] )
that means I can not get this kmlLayer at this time,(I donn't know
why)
but I can get the same kmlLayer form another computer or anoher
explorer.

after that, creat the same kmlLayer again, I will get response:HTTP/
1.1 304 Not Modified.
so. I cannt get this kmlLayer for a long time, except clean the IE
catch.

My question is:

1. Why KML SERVER return _xdc_._m8b7fh && _xdc_._m8b7fh( [1] )
sometimes, when the kml file can open with another computer.

2. How can I retry to get this kmlLayer without responsed by HTTP/1.1
304 Not Modified,
when I get return _xdc_._m8b7fh && _xdc_._m8b7fh( [1] ) something like
this.

and I have tried some methods, such as:
kmlLayer = new google.maps.KmlLayer(kmlUrl + "?rand=" +
Math.Random() );
but, I think it is not a good way, am I?

My Website Address:
http://maps.ly83.com

Rossko

unread,
Nov 15, 2011, 8:11:56 AM11/15/11
to KML Developer Support - KML Server Side Scripting
Maps API v3 KmlLayer caches your KML for some hours at Google's
servers.

As you have found, the way round that is to add some random appendage
to your URL
Reply all
Reply to author
Forward
0 new messages