AnsweredAssumed Answered

How add style to the new feature on a ServiceFeatureTable

Question asked by joropeza.ingeolan on Jan 8, 2018
Latest reply on Jan 11, 2018 by m.glasesri-de-esridist

I can add a feature to my ServiceFeatureTable and I can see on ArcGisOnline the new feature is there. But I cant see it on the map. Is the point invisible? Do I need to add some style? Or isn't the feature georeferenced yet?

 

ServiceFeatureTable tblWorkers = new ServiceFeatureTable(featureTableUri);

// load the feature table
await tblWorkers.LoadAsync();

 

var attributes = new Dictionary<string, object>
{
    { "worker_id", 3 },
    { "x_lat", -66.88 },
    { "y_long", 10.55 },
    { "time", "2017-12-24 18:00:00" }
};

MapPoint structureLocation = new MapPoint(-66.88, 10.55);

// create a new feature in the damage table, pass in the attributes and geometry
Feature newFeature = tblWorkers.CreateFeature(attributes, structureLocation);

 

// add the new feature (this updates the local copy of the table)
await tblWorkers.AddFeatureAsync(newFeature);

 

// push this update (apply edits) to the feature service
IReadOnlyList<EditResult> editResults = await tblWorkers.ApplyEditsAsync();

 

At first I load my layer from a shape and I can select the red point and see it selected on the map. The green one I add it from .net but doesn't show in the map.

 

Outcomes