Hello,
I am using ArcRuntime 100.9.0 .NET sdk, and I'm querying a ServiceFeatureTable that contains polylines. The query works, but when I inspect the geometry of the feature, the M values are all NaN. I know the feature does have M values by inspecting the same feature in ArcPro. Also, if I just use a browser to the go to the uri and query (i.e. http/{myserviceURI}/query) , I can set ReturnM to true, and see the M values in the geometry.
Code:
//Get layer and add to map...
Uri serviceUri = new Uri(/**uri string**/);
CenterlineLayer = new FeatureLayer(serviceUri);
_map.OperationalLayers.Add(CenterlineLayer);
...
//Query service
QueryParameters queryParams = new QueryParameters();
queryParams.WhereClause = "CENTERLINE_HISTORY_ID = 5";
queryParams.ReturnGeometry = true;
FeatureQueryResult queryResult = await CenterlineLayer.FeatureTable.QueryFeaturesAsync(queryParams);
SelectedCenterline = queryResult.First();
//See screenshot to see NaN as the M Value
In a browser I can go to
uri_string/query?where=CENTERLINE_HISTORY_ID+%3D+5&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRel...
I get the M values:
{ ... "features": [ { "attributes": { "COMPANY_NAME": "HEC" }, "geometry": { "hasM": true, "paths": [ [ [ -10194353.727657143, 3462589.2523800787, 0 ], [ -10194351.748618515, 3462584.1271569589, 15.600000000005821 ], [ -10193529.228768408, 3460914.2605744163, 5303.8999999999942 ], [ -10191907.687540743, 3458520.5200898903, 13524.100000000006 ], [ -10191835.948896401, 3458416.2688311678, 13883.940000000002 ], .....}
Is there something I need to set on the QueryParameters? I explicitly set ReturnGeometry to true, although it looks like it defaults to true.