As I stated above, I have a PHP script and a JavaScript, I have a few objects that read text files on the server side and then pass the data to the JavaScript.
Here's my entire code:
map.html: http://www.pastebin.com/b45mbvgp and index.php: http://www.pastebin.com/zibdquzu
The part that really matters:
var x = <?php echo json_encode($streetsObject); ?>;
var obj = eval("("x")");
I've also tried
var obj = JSON.parse(x);
the X variable does get set to the size of the passed object, 527 (tested it) but when I try to use the eval or JSON parse function is simply doesn't work. Do I have some sort of mistake in my html code which is messing with my calls to other libraries? If so that would be weird because kinetic.js is working just fine. I've been googling examples of JSON and I have yet to see an example of parsing a passed object, it's all examples of local objects :(
(Code works fine if I remove eval / json line of code)