question about cc.TMXTiledMap.getProperty(propertyName)

question about cc.TMXTiledMap.getProperty(propertyName)
0.0 0


I try to use TMXTiledMap.getProperty(propertyName) to get some property in TMX map.But it doesn’t work.When i jump into the source code, i find these codes.
this._properties = mapInfo.getProperties();
@ // The parent element is the map
var propertyArr = map.querySelectorAll(“map > properties > property”);
if (propertyArr) {
for (i = 0; i < propertyArr.length; i++) {
var aProperty = {};
aProperty[propertyArr[i].getAttribute(‘name’)] = propertyArr[i].getAttribute(‘value’);
setProperties:function (Var) {
So all property values are saved as an object array. If i want to get the property.i need foreach the array.
I don’t know whether this is a problem or my misunderstanding, could anyone give me some suggestion?


I’m having the same problem… I’ll create an issue in the tracker now.