I'm having an issue adding a feature layer to an existing webmap. Here's what I'm trying to accomplish.
I'm building a feature layer from a feature collection. The attributes for the feature collection is coming out of a different service then arcgis server, (just a database table). When building up the feature collection, It keeps shooting me in the foot saying no object id. So I went ahead and told it to use a different field for the object id. here's a code snippet of my feature collection:
var featureCollection = {
"layerDefinition": null,
"featureSet": {
"features": [],
"geometryType": "esriGeometryPolygon"
}
};
featureCollection.layerDefinition = {
"geometryType": "esriGeometryPolygon"