Since today performance problem when using own map type

75 views
Skip to first unread message

NoRyb

unread,
Jan 25, 2012, 5:33:13 AM1/25/12
to google-map...@googlegroups.com
Hello

I created my own base map type which does nothing but implement the getTile function like so:

    var div = ownerDocument.createElement('DIV');
    div.style.width = this.tileSize.width + 'px';
    div.style.height = this.tileSize.height + 'px';
    return div;

But since today, it takes ages to load the tiles after I set the mapTypeId when zooming in to zoomlevel 20 (before was maptypeid "satellite").

Did anything in the last 24 hours?

Thanks

Martin™

unread,
Jan 25, 2012, 6:01:57 AM1/25/12
to Google Maps JavaScript API v3
Are you experiencing this with Chrome only by any chance?

I've recently seen Chrome rendering custom maps very slowly but other
browsers render the same custom maps perfectly.
The same custom maps previously (not sure how long ago) worked fine
with Chrome.

Martin.

NoRyb

unread,
Jan 25, 2012, 6:04:47 AM1/25/12
to google-map...@googlegroups.com
I'm using IE9 but I experience the same with Chrome. Both the browser are from the newest version and I haven't updated them in the last few days...

~N

Enoch Lau (Google Employee)

unread,
Jan 25, 2012, 11:37:28 AM1/25/12
to google-map...@googlegroups.com
Can you create a demo that illustrates this slowness please? Which browser / OS are you using?

Enoch

Martin™

unread,
Jan 26, 2012, 3:35:53 AM1/26/12
to Google Maps JavaScript API v3
Hi Enoch.

I don't want want to hijack this thread but you might want to take a
look at this map:

http://code.martinpearman.co.uk/deleteme/my_overlay_map/

It's an overlay map types that refreshes every 10 seconds.

Originally it refreshed itself smoothly in all browsers but recently
someone pointed out that the latest Chrome is very slow to initially
load the tiles and then very slow to update the tiles on a refresh.

In any browser other than Chrome it stills loads and updates smoothly
and quickly.

Martin.





On Jan 25, 4:37 pm, "Enoch Lau (Google Employee)"

David

unread,
Jan 26, 2012, 6:03:33 AM1/26/12
to google-map...@googlegroups.com
Hi,

Just to share my experience: I have also been experiencing slow performance problems with Chrome when refreshing the custom map tiles of the page posted by Martin.  
I am running the last version of Chrome with no extensions, on Windows 7 Professional 64 bits. Other browsers (Opera and Firefox, in my case) work with no problems at all.

Thanks.

Marcelo

unread,
Jan 26, 2012, 6:29:15 AM1/26/12
to Google Maps JavaScript API v3
On Jan 26, 12:35 am, Martin™ <warwo...@gmail.com> wrote:
>
> http://code.martinpearman.co.uk/deleteme/my_overlay_map/
>
>
> In any browser other than Chrome it stills loads and updates smoothly
> and quickly.

Looks fine from here, with Chrome 10.0.648.205 on Windows XP Pro, (and
I have a lousy internet connection).
I let it refresh 10 times and there was no problem.

--
Marcelo - http://maps.forum.nu
--

Andrew Leach

unread,
Jan 26, 2012, 6:40:00 AM1/26/12
to google-map...@googlegroups.com
On 26 January 2012 11:29, Marcelo <marce...@hotmail.com> wrote:
>
> Looks fine from here, with Chrome 10.0.648.205 on Windows XP Pro

Ah, but Chrome is currently at 16.0.912.77 m. Looks like the
fastest-rendering browser no longer is. But I guess Google's Maps team
are in the best position to put some pressure on the Chrome team.

Might be a good reason not to allow it to update, though, Marcelo :-)

Marcelo

unread,
Jan 26, 2012, 7:16:25 AM1/26/12
to Google Maps JavaScript API v3
On Jan 26, 3:40 am, Andrew Leach <andrew.leac...@gmail.com> wrote:
>
> Might be a good reason not to allow it to update, though, Marcelo :-)

Yeps, I think there are many good reasons not to allow automatic
updates, (of anything).
Android is driving me nuts with "System Update Available" every hour
or so, and I have to click "Install Later" every time. No clean way to
disable it.

Google, are you reading? ;-)

(Sorry about getting sidetracked, but killing automatic updates might
solve the OP's problem too.)

Martin™

unread,
Jan 26, 2012, 1:00:52 PM1/26/12
to Google Maps JavaScript API v3
Let me add that i am using 64bit Windows 7 here.

Martin.

NoRyb

unread,
Jan 27, 2012, 3:57:24 AM1/27/12
to google-map...@googlegroups.com
I've extracted everything I did into a .html-File (I had everything split up inito different .js-files). Now when I run the HTML-File everything works fine.

I'm using Visual Studio 2010 and around it is a master-page and everything I build is within a "Content-Placeholder". The only way I can explain this effect to myself is, that something has changed in the "algorithm" that creates the Tiles.

The only difference I see at the moment to my "standalone" HTML file is that on the VS2010 side there's some other scripts loaded like jquery that could conflict with google's...

Did anything change in the way, how tiles are retrieved? Because on Jan 24th everything went fine and on jan 25th, without me changing anything over night it became slow...

NoRyb

unread,
Feb 6, 2012, 8:18:56 AM2/6/12
to google-map...@googlegroups.com
Any news on this? I've found out that the problem only occurs when I switch from a map type (in my case satellite map) to my own base map. When I zoom in an out on my own base map there's no problem with the speed of loading the tiles. As soon as I loaded another map and then load my base map again I get to wait a few seconds again.

NoRyb

unread,
Feb 6, 2012, 8:29:44 AM2/6/12
to google-map...@googlegroups.com
UPDATE:

Even better, it also happens in Google's own examples (from the Tutorial section):


Change the Maptype (upper right corner) to "Map" and back to "Tile #s" and you have to wait about 6 seconds until the EMPTY tiles are loaded whereas the more detailed tiles of the Map are loaded immediately.

I'm pretty sure that this effect started on Jan. 25th!

Thanks

Enoch Lau (Google Employee)

unread,
Feb 6, 2012, 4:03:56 PM2/6/12
to google-map...@googlegroups.com
Thanks, that's a good example - we'll take a look at it.

Enoch

Enoch Lau (Google Employee)

unread,
Feb 6, 2012, 10:34:28 PM2/6/12
to google-map...@googlegroups.com
Hi NoRyb

I just have a few questions about the problem that you're having:
  • Maybe I missed it in the twists and turns of this thread, but would you be able to post a link to a demo that shows your custom map type that's running slow for you? And which browser / OS?
  • In the maptype-base.html demo, I see that the old tiles hang around for about 5 seconds but the new tiles display immediately. That behavior seems to be fine, as map tiles are typically opaque, so the new tiles will cover the old tiles. Can I confirm with you that you're not seeing the new tiles come up until after 6 seconds?
Enoch

NoRyb

unread,
Feb 7, 2012, 6:04:44 AM2/7/12
to google-map...@googlegroups.com
Hello Enoch

1) I will try an get an example to run so I can show you - I'll have to set up everything up and I'm not sure if I can do that so easily so it is accessible from the web. I'll tell you if I was able to do so.

Basically I experience EXACTLY the same behaviour as you see in maptype-base.html. I am using Windows 7 and Browser IE9 and Chrome 16.0.912.77m.

2) No I cannot confirm that. I just enabled to show the border in my example and I see the same behaviour as maptype-base.html. So the border of the tiles immediately show up (which for me means, that the new tiles are immediately loaded) but the old tiles hang around for 6 seconds.

I understand that the new tiles are opaque which is correct. I think that the old tiles hang around for such a long time is new.


So to summarize: The problem you see with maptype-base.html is exactly my problem. The old tiles hang around for too long.

Thank you for your effort!
~N

Enoch Lau (Google Employee)

unread,
Feb 7, 2012, 6:28:40 AM2/7/12
to google-map...@googlegroups.com
If the old tiles hang around for a few seconds, what problem does that cause if the tiles are opaque? The user can't see them.

Enoch

NoRyb

unread,
Feb 7, 2012, 6:42:32 AM2/7/12
to google-map...@googlegroups.com
Well what I do is create an "empty" MapType over which I draw an OverlayMap... I guess I could create tiles which are not opaque - the thing is, the behaviour changed from one day to another...

Enoch Lau (Google Employee)

unread,
Feb 7, 2012, 7:13:14 AM2/7/12
to google-map...@googlegroups.com
I think this behavior has been around for a while; I'm not sure why you're just seeing it now. What is an overlay map?

NoRyb

unread,
Feb 7, 2012, 7:19:31 AM2/7/12
to google-map...@googlegroups.com
Well I can get around the behaviour by just setting the background on my div to any color. Which is fine for me - but I'm pretty sure it wasn't like this. Doesn't matter.

What I do is create a basemaptype with "empty" tiles (now with a grey backround). Then I overlay an ImageMapType with custom images. This way I only see what I have Images for and everything else is just gray.


Thanks for your help
~N

Enoch Lau (Google Employee)

unread,
Feb 7, 2012, 8:19:29 AM2/7/12
to google-map...@googlegroups.com
Great to see that you've gotten your map to work.

Enoch
Reply all
Reply to author
Forward
0 new messages