Hey, I am building an Addin to AGP that gets data from an Oracle database and displaying on a map. The user can from a combobox select the layer thay want to see.
When I am creating a new projekt i pro and select a layer from the combobox, the map are zooming out to this:

QueryDescription queryDescription = oracleDatabase.GetQueryDescription(SQLquery, this.tableName);
queryDescription.SetObjectIDFields("OBJECTID");
queryDescription.SetShapeType(geomType);
SpatialReference spatialReference = MapView.Active.Map.SpatialReference;
Table table = oracleDatabase.OpenTable(queryDescription);
FeatureClass featureClass = oracleDatabase.OpenTable(queryDescription) as FeatureClass;
if (featureClass.GetCount() != 0)
{
FeatureLayer featureLayer = LayerFactory.Instance.CreateFeatureLayer(featureClass, map, layerName: tableName);
} else
{
// Display a message
}
How can I make it zoom correctly?