We're getting this same issue currently where multiple Google IPs are 
hitting our server (that builds and streams the kmz) multiple times (ranges 
from 10 to 30) per view/pan/zoom of the map. Tried the suggestion below 
without luck.

On Wednesday, 16 January 2013 08:04:37 UTC-7, Io Mihai wrote:
>
> I've experienced the same problem. A flood of requests by the maps api 
> when loading a kmz file, 10-30 requests by different google servers. I have 
> 1-2MB kmz files and my bandwith was frequently over quota.
>
> My application is on Google App Engine / python and the kmz files are 
> stored in the Blobstore.
>
> After refactoring all my javascript and the blobstore code I solved the 
> issue by changing the way I included the maps api.
> from:
> <script src="//maps.googleapis.com/maps/api/js?sensor=false"></script>
> to:
> <script src="https://maps.googleapis.com/maps/api/js?sensor=false
> "></script>
>
> I guess not using the protocol confused the google maps cache.
>
> I also added caching headers when serving the files from the blobstore.
>
> expires_date = datetime.datetime.utcnow() + datetime.timedelta(1)
> expires_str = expires_date.strftime("%d %b %Y %H:%M:%S GMT")
> self.response.headers['Expires'] = expires_str
> self.response.headers['Content-Type'] = 'application/vnd.google-earth.kmz'
> self.response.headers['Cache-Control'] = 'public, max-age=80000'
>
> I hope this helps.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-maps-js-api-v3/-/mxTAhI6fWRQJ.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to