Load data from JSON file into map markers in Google Maps

后端 未结 2 541
失恋的感觉
失恋的感觉 2021-02-11 01:13

I\'ve got the following JSON file:

{
   \"universities\" : [
    [
        \"title\": \"Aberystwyth University\",
        \"web\": \"www.aber.ac.uk\",
        \"         


        
2条回答
  •  走了就别回头了
    2021-02-11 01:53

    JSON is invalid - see correction

    {
        "universities" : [
            {
                "title": "Aberystwyth University",
                "web": "www.aber.ac.uk",
                "phone": "+44 (0)1970 623 111",
                "lat": 52.415524,
                "lng": -4.063066
            },
            {
                "title": "Bangor University",
                "web": "www.bangor.ac.uk",
                "phone": "+44 (0)1248 351 151",
                "lat": 53.229520,
                "lng": -4.129987
            },
            {
                "title": "Cardiff Metropolitan University",
                "website": "www.cardiffmet.ac.uk",
                "phone": "+44 (0)2920 416 138", 
                "lat": 51.482708,
                "lng": -3.165881
            }
        ]
    }
    

提交回复
热议问题