Parameters
- geometry
- The input geometry.
Return Value
The geometry with the M-values set to NaN. If the geometry is empty or the spatial reference is
null, then the input geometry is returned unchanged.
Exception | Description |
---|---|
System.ArgumentNullException | Geometry is null. |
System.InvalidOperationException | This geometry is not M-Aware. |
System.NotImplementedException | The method is not implemeted for GeometryBag. |
string json = "{\"hasM\":true,\"paths\":[[[-4,2,1],[-4,5,2],[-2,5,3],[-2,7,4],[2,7,5]],[[4,1,-1],[2,1,-2],[2,-2,-3],[-3,-2,-4],[-3,0,-5]]]}}"; Polyline polyline = PolylineBuilderEx.FromJson(json); Polyline outputPolyline = GeometryEngine.Instance.DropMs(polyline) as Polyline; // outputPolyline.HasM = true. Every M-value is NaN. // outputPolyline.ToJson() = {"hasM":true,"paths":[[[-4,2,null],[-4,5,null],[-2,5,null],[-2,7,null],[2,7,null]],[[4,1,-null],[2,1,null],[2,-2,null],[-3,-2,null],[-3,0,null]]]}
Target Platforms: Windows 11, Windows 10