我们正在开发phonegap应用程序CSV。我们得到数据表单文件。它看起来像这样
我们需要将数据拆分为两个字符串 像
String1
字符串2 
我们像这样尝试过但我们没有运气所以请指导我
var split = string.split('\r\n');
Run Code Online (Sandbox Code Playgroud)
请帮我
我们有json.在json有10纬度和10经度google.maps.DirectionsResult.MAX_WAYPOINTS_EXCEEDED.我们尝试在这些点之间绘制线.但是我们得到了状态代码.所以在删除了两个点之后.现在我们试图画出8点之间的线,它工作得很好.但是在json中,有一段时间经过50到100纬度和经度.我们试过这样的
var aa=waypts[0].location.k;
var bb=waypts[0].location.D;
var cc=waypts[waypts.length-1].location.k
var dd=waypts[waypts.length-1].location.D;
var start1= new google.maps.LatLng(aa,bb);
var end1=new google.maps.LatLng(cc, dd);
var request = {
origin: start1,
destination: end1,
waypoints: waypts,
optimizeWaypoints: true,
travelMode: google.maps.TravelMode.DRIVING
};
debugger;
directionsService.route(request, function(response, status) {
debugger;
if (status == google.maps.DirectionsStatus.OK) {
directionsDisplay.setDirections(response);
var route = response.routes[0];
}
});
Run Code Online (Sandbox Code Playgroud)
首先告诉我如何在8点以上划线.请指导我