[Solved] Why is give me “Uncaught SyntaxError: Unexpected identifier”, in javascript? [closed]


poiData should be another property name, not a variable assignment.

var World = {

     poiData: {
        "id":"1",
        "longitude": "a" ,
        "latitude": "a" ,
        "altitude": "a" ,
        "description": "esta es una descripcion de mi poi",
        "title": "titulo"
    },

    initiallyLoadedData: false,

    markerDrawable: null,
...
};

Actually, if this there are supposed to be many places of interest, poiData should be an array of objects:

var World = {

     poiData: [
        {
            "id":"1",
            "longitude": "a" ,
            "latitude": "a" ,
            "altitude": "a" ,
            "description": "esta es una descripcion de mi poi",
            "title": "titulo"
        },
        {
            "id":"2",
            "longitude": "b" ,
            "latitude": "b" ,
            "altitude": "b" ,
            "description": "esta es una otra descripcion de mi poi",
            "title": "titulo 2"
        }
    ],
    initiallyLoadedData: false,

    markerDrawable: null,
...
};

2

solved Why is give me “Uncaught SyntaxError: Unexpected identifier”, in javascript? [closed]