我收到此错误
buffer.js:495
throw new Error('"toString()" failed');
我正在尝试使用此功能一次解析大量数据:
exports.markers = function(resp, resp2) {
this.markersOne = function() {
var lat, lng = [];
return resp.map(function(element) {
lat = element.location_1.coordinates[1];
lng = element.location_1.coordinates[0];
return new google.maps.LatLng(lat, lng);
})
}
this.markersTwo = function() {
return resp2.map(function(element) {
var lat, lng = [];
if (element.location_1 != undefined && element.location_1.length > 0) {
lat = element.location_1.slice(1, -12);
lng = element.location_1.slice(10, -1);
return new google.maps.LatLng(lat, lng);
}
})
}
var result = this.markersOne().concat( this.markersTwo() );
console.log(result);
return result;
}
我有两个数据库作为JSON文件下载到目录中。
一个是304 MB,另一个是80 MB。
看到304 MB是如何过大的,我可以通过其他方式解决这个问题?