I am trying to develop a cross section widget to visualize geology boreholes. The idea is like cross section for terrain, the only difference is that the polyline will intersects with boreholes (points). For the visualization it is basically a stacked bar chart with parameters include accumulated distance between points (distance) and the point's attributes (depth & soil type).
Currently I am facing stuck at getting the ordered intersection points. I was able to use Query API to query boreholes layer with polyline as geometry parameter. However, the results are not ordered following the polyline. And I know Query API cant do "order by" using geometry.
I was thinking of using GeometryService.Intersection to query each section of polyline and sort the order based on whichever point is nearest to the start node. Believe this is workable but not really efficient.
Is there any other API or method that I could use to solve this problem? Thanks.