我正在尝试加入latLng
存储在这样的数组中的值列表:
"48.2025,16.3687","48.2437,16.3797"
相反,我不断得到这样的输出:
"48.2025,16.3687,48.2437,16.3797"
这是我正在使用的代码:
$(document).ready(function()
{
$('#printMapLatLng').click(function()
{
var printPoints = [];
for (var i in points) {
var input = points[i].LatLng.toString();
var output = ''+input.replace( /\s/g, "").slice(1,-1)+'';
printPoints.push(output);
}
var fullArray = printPoints.join();
$(this).attr('href',PowerHour.getPrintUrl([fullArray]));
});
});