Clear Google Cache KML files?

1,559 views
Skip to first unread message

Thoern

unread,
May 10, 2011, 2:31:30 AM5/10/11
to Google Maps JavaScript API v3
Looked for some way to clear the cashed file at google when one have
opened a kml file.

Is there some other way than renaming the file like below?

If you remove the file on the server and then open the kml is the
cashe removed then?


to append a parameter to the url that changes everytime you request
it
(or at least everytime the data changes). I usually use a function
of
the Date(), some people use a random number.


Rossko

unread,
May 10, 2011, 4:05:22 AM5/10/11
to Google Maps JavaScript API v3
> Looked for some way to clear the cashed file at google when one have
> opened a kml file.
>
> Is there some other way than renaming the file like below?

No, you have no other control over how long KmlLayer caches your KML
at Google's servers.

If it is critical to your project, don't use KmlLayer use a client-
side parser like GeoXml3, where you retain control. There are
performance penalties.

Thoern

unread,
May 10, 2011, 4:48:49 AM5/10/11
to Google Maps JavaScript API v3
A quick hack was to just rename the kml folder and setting the path in
the html file to the new folder name.
Geoxml is that compatible w safari? maby woth looking into instead.
But since I can export from MapInfo and have all info in the kml
intact its pretty nice.
My thingy works pretty nice on an iphone now and fast with KML.
It split up the "lots" into kml files, then just generate a marker in
googlemap for each lot wich has a corresponding kml file. The map just
keep track of which marker are in view and just open up that kml. On a
setting page you can switch layers, set "follow GPS" and so on.
Also if want to make a change on some polygon I can call a SQL script
that updates the "main db" stored at a serverside DB.
Reply all
Reply to author
Forward
0 new messages