Tag: chartbeat

jQuery解析数据并获取lat和lng并插入到Google Maps`中

我使用jQuery从以下URL获取JSON: http://api.chartbeat.com/live/geo/v3/?apikey=fakekeytoshowtheurl&host=example.com 这是我得到的JSON的一个例子: “lat_lngs”: [[25, -80, 9], [26, -80, 6], [27, -80, 1], [29, -98, 2], [29, -95, 7], [30, -97, 3], [33, -117, 6], [33, -112, 25], [33, -111, 33], [34, -112, 1], [34, -111, 1], [36, -109, 1], [38, -97, 2], [40, -73, 1], [42, -78, 2]] 我正在尝试使用jQuery并获取每个lat_lng并运行一个函数。 这是我目前没有的代码。 function addMarker(latitude, longitude) { […]