Jump to content

Tiled map type error Phaser 2.0 migrating to Phaser 2.4.9


Recommended Posts

I don't understand why I get this error TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D

I attached the json file of my map. Below is my script

map = this.game.add.tilemap('map');
    layer = map.createLayer('Maze Pattern');

    //Background Maze
    map.addTilesetImage('background', 'background');

    map.createFromObjects('Object Layer 1', 488, 'sydney', 0, true, false);
    map.createFromObjects('Object Layer 1', 487, 'orange', 0, true, false);

    //visible map for pattern only
    map1 = this.game.add.tilemap('map');
    map1.addTilesetImage('roadFinal', 'roadFinal', 32, 32);
    layer1 = map1.createLayer('Maze Level 1');

And below is my preload

this.game.load.tilemap('map', ASSETS_IMAGE_URL+'maze/level1.json', null, Phaser.Tilemap.TILED_JSON);

Thanks in advance. I don't have an error in Phaser 2.0


Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...