Does any know what I’m doing wrong because I just can’t seem to get this to work and I’m not sure why and unfortunately the error message in the console is about as helpful as wet tissue paper.
Ok so first I need to write an array to hold the coordinate data, now I’m familiar with simple arrays like this
Code: Select all
var colors = ['red', 'green', 'blue'];
Now obviously I’ll need to figure out how to loop through the array to apply the coordinates to the icons but first things correct the syntax error because nothing else is going to work till I get this right.
Ok so here is a cut down version of the array in question
Code: Select all
var icons =
[
icon1: {x: -609840, y: 1879080, z: -1617000}
icon2: {x: 3552000, y: 333000, z: 4151400}
icon3: {x: 722400, y: -1187760, z: 1300320}
icon4: {x: -1603560, y: 506520, z: -1195320}
icon5: {x: -7022400, y: 435960, z: -1504440}
];
Which is of course total rubbish because the closing square bracket isn’t missing, so my question is what did I do wrong because I haven’t been able to find a simple and clear explanation of how to do what I’m trying to do.SyntaxError: missing ] after element list