var theLevels = HOME.getLevels(); var levelName = theLevels[0].getName(); console.log('levelName: '+levelName); var objLevel = theLevels[0]; console.log(objLevel); HOME.setSelectedLevel("Level 1", objLevel);
At the line:
HOME.setSelectedLevel("Level 1", objLevel);
A javascript error occurs, which is:
"Error: TypeError: m.getElevation is not a function"
However, the code prints the object 'objLevel'
console.log(objLevel);
I can see in the console log, the object 'objLevel' shows there is a function named "getElevation".
Does anyone have an idea why there is an error of "getElevation is not a function" and yet there is a function named "getElevation" in the object that is being passed to HOME.setSelectedLevel() ?