Parameters
- multipart
- The multipart on which to set the M values.
- fromM
- The beginning M value.
- toM
- The end M value.
Exception | Description |
---|---|
System.ArgumentNullException | Multipart is null or empty. |
System.InvalidOperationException | This geometry is not M-Aware. |
InvalidParameterException | The input fromM and toM are invalid and M values cannot be interpolated. |
System.NotImplementedException | Spatial reference of multipartis an image coordinate system. |
string json = "{\"hasM\":true,\"paths\":[[[-3000,-2000],[-2000,-2000],[-1000,-2000],[0,-2000],[1000,-2000],[2000,-2000],[3000,-2000],[4000,-2000]]],\"spatialReference\":{\"wkid\":3857}}"; Polyline polyline = PolylineBuilder.FromJson(json); Polyline outPolyline = GeometryEngine.Instance.SetAndInterpolateMsBetween(polyline, 100, 800) as Polyline; ReadOnlyPointCollection outPoints = outPolyline.Points; // outPoints M values are { 100, 200, 300, 400, 500, 600, 700, 800 };
Target Platforms: Windows 10, Windows 8.1