# Method FractionAlong

#### FractionAlong(Polyline, MapPoint, Double)

Finds the location on the line nearest the point, expressed as the fraction along the line's total geodesic length, if the point is within the specified distance from the closest location on the line. The line and point must have consistent spatial references.

##### Declaration

`public static double FractionAlong(this Polyline line, MapPoint point, double tolerance)`

##### Parameters

Type | Name | Description |
---|---|---|

Polyline | line | The line to locate the point's distance along its length. |

MapPoint | point | The point to locate. |

Double | tolerance | The maximum distance that a point is allowed to be from the line, in the units of the SpatialReference. If the tolerance is any negative value, the fraction of the closest location on the line is always returned as long as the point lies between the two ends of the polyline. If the distance from the point to the closest location on the line is greater than the tolerance, or the tolerance is -1 and the point does not lie between the two ends of the polyline, NaN is returned. |

##### Returns

Type | Description |
---|---|

Double | The length along the line nearest the input point, expressed as the fraction of the line's length between 0.0 and 1.0, or NaN if the point is outside the tolerance. |

##### Remarks

Supports true curves.

### Applies to

## Platforms and versions

Target | Versions |
---|---|

.NET Standard 2.0 | 100.6 - 200.1 |

.NET 6.0 | 100.13 - 200.1 |

.NET 6.0 Windows | 100.13 - 200.1 |

.NET 6.0 Android | 200.0 - 200.1 |

.NET 6.0 iOS | 200.0 - 200.1 |

.NET Framework | 100.6 - 200.1 |

.NET 5 | 100.10 - 100.12 |

.NET Core 3.1 | 100.7 - 100.12 |

Android | 100.6 - 100.15 |

iOS | 100.6 - 100.15 |

UWP | 100.6 - 200.1 |