AnsweredAssumed Answered

How to reproject feature layer from esri server?

Question asked by jkane12 on Apr 20, 2017
Latest reply on Apr 21, 2017 by jkane12

Trouble loading feature layer in code behind.  This is in runtime 10.2.7.

 

In XAML I define my base map as..

<esri:Map>
                <esri:ArcGISTiledMapServiceLayer
                    ServiceUri="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />

 

This map layer reports Spatial Reference: 102100 (3857)

 

Then in the code behind, i try to load the feature layer..

 

 string endpoint = "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0";
            Uri featUri = new Uri(endpoint);
            var gdbServiceFeatureTable = await ServiceFeatureTable.OpenAsync(featUri);
            gdbServiceFeatureTable.OutFields = Esri.ArcGISRuntime.Tasks.Query.OutFields.All;            
           FeatureLayer fl = new FeatureLayer(gdbServiceFeatureTable) { ID = endpoint };   
           
            MyMapView.Map.Layers.Add(fl);
This map layer reports Spatial Reference: Spatial Reference: 4326
Nothing is visible in the map.
However, if I add this layer via XAML, it is visible.
Any help would be appreciated.
thanks,
joe

Outcomes