AnsweredAssumed Answered

Question about geometryEngine intersect

Question asked by ibroad on Apr 4, 2018
Latest reply on Apr 4, 2018 by ibroad

I'm doing some testing, and the intersect tool isn't working like I thought it would.


I have simple code using the SketchViewModel to create a polyline.


I check the graphicLayer, and when 2 lines are created I want to get a point geometry where the lines intersect.


sketchViewModel.on('draw-complete', function(evt) {

     if ( == 2) {

          var line1 =[0].geometry;
          var line2 =[1].geometry;


          var intersection = geometryEngine.intersect(line1, line2);



`line1` and `line2` log fine with correct geometry, but `intersection` just logs `null`.


Any idea why?


If I change `intersect` to `intersects` it logs `true`.