playh5 Posted March 7, 2017 Share Posted March 7, 2017 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.createLayer('background'); map.addTilesetImage('background', 'background'); //sign 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 level1.json Link to comment Share on other sites More sharing options...
playh5 Posted March 7, 2017 Author Share Posted March 7, 2017 Sorry needs up up for client. Thanks! I just back with Phaser 2 years ago Link to comment Share on other sites More sharing options...
Recommended Posts