Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maps Bing Map V8群集传递实时数据_Maps_Bing Maps - Fatal编程技术网

Maps Bing Map V8群集传递实时数据

Maps Bing Map V8群集传递实时数据,maps,bing-maps,Maps,Bing Maps,我只是从Bing地图开始。查阅了官方文件中的几个例子 来自 当我在ClusterLayer中传递上述对象时,我得到以下错误 Uncaught TypeError: i[t].getLocation is not a function(…) 您必须循环浏览数据并将其转换为图钉。下面是一个代码示例: var pins = []; for(var i = 0;i < mapData.length;i++){ var pin = new Microsoft.Maps.Pushpin(n

我只是从Bing地图开始。查阅了官方文件中的几个例子

来自

当我在ClusterLayer中传递上述对象时,我得到以下错误

Uncaught TypeError: i[t].getLocation is not a function(…)

您必须循环浏览数据并将其转换为图钉。下面是一个代码示例:

var pins = [];

for(var i = 0;i < mapData.length;i++){
    var pin = new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(mapData[i].Latitude, mapData[i].Longitude));

    //Store the original data object in the pushpins metadata so that you can access other properties like Name.
    pin.metedata = mapData[i];

    pins.push(pin);
}

//Now "pins" is an array of pushpins. Add them to the map or to the clustering layer.
var引脚=[];
对于(var i=0;i
Uncaught TypeError: i[t].getLocation is not a function(…)
var pins = [];

for(var i = 0;i < mapData.length;i++){
    var pin = new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(mapData[i].Latitude, mapData[i].Longitude));

    //Store the original data object in the pushpins metadata so that you can access other properties like Name.
    pin.metedata = mapData[i];

    pins.push(pin);
}

//Now "pins" is an array of pushpins. Add them to the map or to the clustering layer.