Question

I'm plotting out some points in Google Maps, however some of the JSON isn't populating correctly. Flipping through a few of the points, i noticed that the default image wasn't populating. Chrome inspector shows that the value of the src attribute in img's that aren't working is undefined. when i run the JSON through JSONlint, it's throwing an error on a string:

"Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['";

It says that it's not, when it is. i'm sure i borked something else up and that's why it's not showing up as a string, but what? Not sure how to go forward testing this. You can check out the code here: http://jsfiddle.net/jalbertbowdenii/4Y3JF/

No correct solution

OTHER TIPS

I don't get a JSON-validation-error, but not all items of the JSON have a length of 9, so accessing locations[i][8] will fail there.

There are also items with a length of 10, the img-src there can be found in locations[i][9]

You may access the img-src by using the index of the last entry:

locations[i][locations[i].length-1]

http://jsfiddle.net/4Y3JF/2/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top