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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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