Select to view content in your preferred language

where are the M values???

624
1
10-08-2013 11:43 AM
Labels (1)
Cristian_Galindo
Frequent Contributor
I create a package file that includes the geodatabase, the geodatabase has define a line feature class that has enable M an Z values.

var centerlineLayerService = sender as LocalFeatureService;

            var centerlineLayer = new ArcGISLocalFeatureLayer
                                      {
                                          Service = centerlineLayerService, 
                                          ID = "arcGISLocalFeatureLayer", 
                                          LayerName = "routes", 
                                          Editable = true, 
                                          AutoSave = true, 
                                          ReturnM = true, 
                                          DisplayName = "Routes",
                                          DisableClientCaching = true,
                                      };


After that I create some lines (create the mapPoints - including M and Z values- then the collection of mapPoints..and finally the observable collection) the line is created and added to the layer.

Then I try this snipped:

var centerlineLayer = this._map.Layers["arcGISLocalFeatureLayer"] as GraphicsLayer;

            foreach (var route in centerlineLayer.Graphics)
            {
                var newLine = route.Geometry as Polyline;
                var pointCollection = newLine.Paths[0];
                
                }


Surprise!!!!! the M Values  in the newLine object are gone!!

why this would happen???
0 Kudos
1 Reply
Cristian_Galindo
Frequent Contributor
Well, trying to figure how to solve this weird behavior....

if i use a GraphicLayer to instatiate ...not the ArcGISLocalFeatureLayer (I know that the second one inherits from the first one)...

the values of M does not disapear.....
0 Kudos