It could be a bug. To verify this, could you send us the WKT definition of the MultiLineShape you do the GetLineOnLine? Also, give us the X and Y values of the points you are using for that. Thank you.
It could be a bug. To verify this, could you send us the WKT definition of the MultiLineShape you do the GetLineOnLine? Also, give us the X and Y values of the points you are using for that. Thank you.
These are the coordinates for the original line: -110.5401246,53.3934808 -110.539955,53.39526
The split point is: -110.540034308832,53.394428014715
These are the coordinates for the first line from the split: -110.5401246,53.3934808 -110.540034308832,53.394428014715
These are the coordinates for the second line from the split: -110.540034308832,53.394428014715 -110.539955,53.39526 -110.539955,53.39526
I don’t understand what you mean by WKT. If you are referring to the information in the API documentation, see below:
C# public LineBaseShape GetLineOnALine( PointShape startPointShape, PointShape endPointShape )
Parameters startPointShape The startPointShape defines where you will start to get the line. If it does not stand on this MultilineShape, the closest point on the MultilineShape will be the start PointShape. endPointShape The endPointShape defines where you will stop getting the line. If it does not stand on this MultilineShape, the closest point on the MultilineShape will be the end PointShape.
Return Value This method returns a BaseLineShape based on a start PointShape and an end PointShape.
Exceptions Exception Description ArgumentNullException Passing a null startPointShape will throw an ArgumentNullException. ArgumentNullException Passing a null endPointShape will throw an ArgumentNullException. InvalidOperationException In the event you attempt to call this method on a shape which has less than two points, it will throw an InvalidOperationException.
Val: Your code uses: LineShape subLineShape = (LineShape)lineShape.GetLineOnALine(StartingPoint.LastPoint, pointShape);
My code uses: MultilineShape newshape2 = (MultilineShape)lineshape2.GetLineOnALine(newpoint,endpoint);
I had no problem with the code in your sample. It is with the function in my code that causes the issue. Again, my shapefile is in lat,lng that has to be projected to match GoogleMapsOverlay. I don’t know if this is part of the problem or not.
I changed the code to have it working with a MultiLineShape as you can see below. And this is working fine. In your previous post, you give us the X and Y value of the split point but you don't give us the values for newpoint and endpoint.