Image tiles not loading in firefox

460 views
Skip to first unread message

Mqrius

unread,
Nov 3, 2010, 8:15:54 AM11/3/10
to google-map...@googlegroups.com
I have this problem mainly in firefox, but also in chrome on somewhat slower connections;
Occasionally, it fails to load or show tiles on my custom map.
To reproduce:
Wait for the images to load. If there are holes, then there's the problem.
If there are no holes, zoom in 1 time, to maximum zoom. On maximum zoom, I serve the images as pngs, so they are roughly 5 times as big (in bytes). On firefox, I get many many holes. Zooming out and then in again fixes some of the holes (due to caching I guess)

I've read around a bit, and this problem seemed to have popped up on the original google maps a few years ago, but I'm not sure if the problems are related.
Any idea what the problem could be?

Chris Broadfoot

unread,
Nov 3, 2010, 9:31:29 AM11/3/10
to google-map...@googlegroups.com
Looks like some of your tiles are returning back from the server as 204 No Content.


Doesn't appear to be a Maps API issue, but rather something wrong with your request to tile.php

Chris

--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Mqrius

unread,
Nov 3, 2010, 9:47:23 AM11/3/10
to google-map...@googlegroups.com
Ah yes, when I have no tile available, I reply with a 204. I don't know if this is the proper way to handle this, but it is not the problem.
To prove that, go to this link:
There are no 204s from tile.php, yet there are holes in the map...

Mqrius

unread,
Nov 16, 2010, 1:31:25 AM11/16/10
to google-map...@googlegroups.com
The problem still exists. Does anyone have any idea why?

Esa

unread,
Nov 16, 2010, 6:56:55 AM11/16/10
to Google Maps JavaScript API v3


On Nov 16, 8:31 am, Mqrius <nuntius.ma...@gmail.com> wrote:
> The problem still exists.

I can see holes with FF. Using Firebug, I cannot see those tiles even
requested.


> Does anyone have any idea why?

Maybe the the small tilesize (100px, 100px) causes just too many http
requests at a time.

If you have a look at Google's tile requests, they are spread to more
than one server. Browsers like it. You could try similar arrangement.
Copy your tileset to a different server name and rewrite your
getTileUrl() to fetch every second tile from the second server.

Mqrius

unread,
Nov 16, 2010, 8:21:40 AM11/16/10
to google-map...@googlegroups.com
I don't really have another server handy. I suppose I could create another domain name which would be actually the same computer, but I'm not sure if that would have the desired effect...

Andrew Leach

unread,
Nov 16, 2010, 8:34:58 AM11/16/10
to google-map...@googlegroups.com

It probably would. The different "servers" Google uses
"mt0.google.com", "mt1." etc point to the same load-balanced cluster.

Browsers have a maximum number of requests they can open at once to a
server -- I can't remember the details -- and this is a standard trick
for increasing the number of connections a browser can make.

Chad Killingsworth

unread,
Nov 16, 2010, 9:20:28 AM11/16/10
to Google Maps JavaScript API v3
HTTP specs say 2 simultaneous connections per server. Most web
browsers exceed that but there is still a rather small limit to
simultaneous connections. See http://code.google.com/speed/page-speed/docs/rtt.html#ParallelizeDownloads

Chad Killingsworth

On Nov 16, 7:34 am, Andrew Leach <andrew.leac...@gmail.com> wrote:

Mqrius

unread,
Nov 16, 2010, 9:30:19 AM11/16/10
to google-map...@googlegroups.com
Alright, so multiple cnames and larger tiles should reduce this problem. I can muster up 3 different domain names to serve my tiles from, and will see if that helps (once my request is registered).
One thing that seems weird to me, though, is that the tiles just "aren't there". I don't see any timeout errors or not founds or something in firefox, it just doesn't show up... Any idea why?

Rossko

unread,
Nov 16, 2010, 10:21:08 AM11/16/10
to Google Maps JavaScript API v3
> One thing that seems weird to me, though, is that the tiles
> just "aren't there". I don't see any timeout errors or not founds or
> something in firefox, it just doesn't show up... Any idea why?

We don't know how the API manages its queue for tile image requests ;
we can guess that it _could_ discard excess requests e.g. for
"padding" tiles that are out of actual view. Algorithms for that
would probably be based on 256px tile sizes, so it _might_ give
unexpected results at 100px

Mqrius

unread,
Nov 16, 2010, 10:27:50 AM11/16/10
to google-map...@googlegroups.com
Well, I could be wrong, but that doesn't seem to be the problem here. The dropped tiles seem distributed randomly, and not the same every time the same location is loaded, which I would expect if your explanation was the case. Also, I do suppose different tilesizes are fully supported if there is an option to define the tilesize...
Reply all
Reply to author
Forward
0 new messages