[OpenLayers-Users] First try with html5 canvas for layers

Kris Geusebroek kgeusebroek at xebia.com
Mon Feb 1 02:39:43 EST 2010


Hi Eric,

It's been a while since I've had time to spent on this. If I remember
correctly there where at first some problems with adding images in the
onload so I implemented a chache array to add the images and draw them
from there into the canvas.

For that to work I needed to load all the tiles when panning etc.
In my local setting all works pretty well but since we are using a
proprietary grid format I needed to override some of the grid functions.

It might be because I load the tiles from localhost that it looks like
its working ok on my side.
Or it might be because when the canvas is resized it clears itself, and
that;s what is making it look like disappearing.

I haven't been able to investigate further myself. But the main thing I
wanted to do next is see if I can make it work without the caching array
and redrawing all but only redraw the new loaded tiles.
Need to be aware of the memory consumption of the canvas and the loaded
images though.

Hope this helps.
If you need more information. I can have a look at some of this later
this week maybe.
Any help is appreciated though. I still think it will be a valuable
extra to the current rendering types.

Cheers Kris

-----Original Message-----
From: Eric Lemoine [mailto:eric.lemoine at camptocamp.com] 
Sent: Sunday, January 31, 2010 9:51 AM
To: Kris Geusebroek
Cc: OpenLayers Users
Subject: Re: [OpenLayers-Users] First try with html5 canvas for layers

On Monday, November 23, 2009, Kris Geusebroek <kgeusebroek at xebia.com>
wrote:
> Hi Eric,
>
> I haven't measured the memory use yet. But I'm implementing the
> tilecache layer with a single canvas, all images are loaded through a
> javascript Image object and when all are loaded they are 'drawn' in
the
> single canvas. This way the number of dom elements is significantly
> lower.

Hi Kris. I've taken a look at your Canvas work again. One can see in
the tilecacheCanvas example that, when moving the map, it disappears
and then comes back (when all the new tiles have been loaded I guess).
Do you think there are ways to solve that?

Cheers,

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com



More information about the Users mailing list