Role:
The mapLayer array and tileSets dictionary are feeded when some json files is loaded with AJAX synchronously, but i am controlling this using a variable called loadingMapCycle. After AJAX load all the files, the variable loadingMapCycle will be changed to 1.
When i try to use getTileMapByTileId function in the mapLayer array loop, it will be called once.
The code with commented function:
And the output in console log is:
mapLayer qtt 4
tileMapLayer groundLevel
tileMapLayer belowLevel
tileMapLayer sameLevel
tileMapLayer topLevel
When i active the followed selected line, it will print in the loop only one time
the log:
mapLayer qtt 4
tileMapLayer groundLevel
This is my function:
What should i need to do to this functions work in this loop?