0

I am using the code to get line string feature.when ever i am using coord2 array i am getting correct line string but whenever i am using points array i am not getting correct line string .I have observed that coordinate values in points array are stored in same format as in coord2 array.

This is my code:

   for(i=0;i<pathArr.length;i++)
      {
        var temp=(pathArr[i]+"").split(",");
      //console.log("lat lon "+temp[1]+"   " +temp[0]);
          points[i]= [temp[1],temp[0]];
     }
      //window.alert(points);

   var coord2=[[76,22],[77,24],[78,25],[66,12],[65,15],[76,22],[77,24],[78,25],[66,12],[65,15] ,[76,22],[77,24],[78,25],[66,12],[65,15],[78,25], [66,12],[65,15],[76,22]];
 window.alert(coord2);
  feature = new ol.Feature({
 geometry: new ol.geom.LineString(points)
     });
1
  • Is there a question here? Does something not work as expected or is there an error? It isn't clear. Commented Feb 18, 2016 at 13:56

1 Answer 1

1

See API docs:

dragZoom.setActive(false);
1
  • 1
    @vani if the answer is what you're looking for, mark it as correct. Commented Feb 19, 2016 at 11:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.