[RESOLVED] Tiled TMX tileset not working

[RESOLVED] Tiled TMX tileset not working
0.0 0



I’m trying to use a TMX tileset / tilemap created by Tiled Map Editor, but I’m getting errors because the parser says there are no tiles defined.

I know that GZIP is not supported, so I switched to uncompressed XML and I’m just using the example “isometric_grass_and_water” file that comes with Tiled.
I’ve pasted the top part of the file below…

The error I get its

cocos2d: Warning: TMX Layer Tile Layer 1 has no tiles
TypeError: textureCache is undefined cocos2d-html5/cocos2d/tileMap_parallax_nodes/CCTMXLayer.js:452

But there are tiles defined in Layer 1, so this looks like some sort of parseing problem, or the TMX file is not in the expected format.

Does anyone know why this is not working?

<?xml version="1.0" encoding="UTF-8"?>


i don’t know the reason of this error. but i can show you my tilemap i have used. its working fine:

<?xml version="1.0" encoding="UTF-8"?> H4sIAAAAAAAAA2NiYGBgGsUjFgMA8txr7gACAAA=


@boruis yan,


I’ve resaved as Base64 GZIP format and it works. I thought there was an issue where gzip was not supported, but I’ve double checked and its zlib that is not supported.

But it also looks like uncompressed XML doesn’t work either, so I’ll report it as an issue on GitHub.




TMXXMLParser support XML and csv format now. Please pull code from github.

Thanks for your feedback!


Latest version updated by linshun has fixed the issue with XML.

I have re-tested both XML and CSV with very latest version downloaded at 09:45 UTC today (20:45 Australian Eastern Daylight Saving Time).