More APIdoc for OpenLayers.Tile.Image.getCanvasContext

This commit is contained in:
fredj
2012-01-19 16:12:52 +01:00
parent b4ac0af5d8
commit e9097ce066
+9
View File
@@ -425,6 +425,15 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
* Returns undefined if the browser does not support canvas, if
* the tile has no image or if it's currently loading.
*
* The function returns a canvas context instance but the
* underlying canvas is still available in the 'canvas' property:
* (code)
* var context = tile.getCanvasContext();
* if (context) {
* var data = context.canvas.toDataURL('image/jpeg');
* }
* (end)
*
* Returns:
* {Boolean}
*/