I’m using Google Maps V3 with an OverlayView to put an HTML5 Canvas onto a map. I attached a DIV to the overlay and within the DIV lies the Canvas element.
After the map is panned around/zoomed in, etc, I:
- shift the DIV (left, top CSS attributes) to re-centre the DIV/Canvas
- I redraw the graphics on the Canvas
This works super fast in desktop browsers. However, on an IPAD2 it’s really slow and there’s a lag between shifting the DIV and redrawing the Canvas, so it jumps around every time you move/redraw the map.
It’s almost as if the IPAD redraws the Canvas element tile by tile (like the regular map tiles). Why would it do that though? HTML5 Canvas is normally really fast on an IPAD and has nothing to do with being drawn in tiles.
Any suggestions?
It appears this has to do with making your Canvas object too big. I was making it twice the height and twice the width of the Google Map, so 4x the screen size total, and it seems to really slow things down…