Hi, I created featureLayer with this code.
string featureClassPath = Path.Combine(Project.Current.DefaultGeodatabasePath, "SIA_" + Data.Data.layer_count.ToString());
var featureClassUri = new Uri(featureClassPath);
var parameters = Geoprocessing.MakeValueArray("./result.json", featureClassPath, "POINT");
var gpResult = Geoprocessing.ExecuteToolAsync("conversion.JSONToFeatures", parameters,
null, CancelableProgressor.None, GPExecuteToolFlags.None);
var layerParams = new FeatureLayerCreationParams(featureClassUri)
{
Name = job_id,
IsVisible = true,
};
var createdFC = LayerFactory.Instance.CreateLayer<FeatureLayer>(layerParams, MapView.Active.Map);
I want to get BBOX(bounding box) of features of FeatureLayer
After getting it, I also want to use bbox to create layer using WMTS.
I know how to get WMTS from url
var serverConnection = new CIMInternetServerConnection { URL = json["Mapbox"].ToString() };
var connection = new CIMWMTSServiceConnection { ServerConnection = serverConnection };
var layerParams = new RasterLayerCreationParams(connection)
{
Name = job_id,
IsVisible = true,
};
ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
{
var layer = LayerFactory.Instance.CreateLayer<FeatureLayer>(layerParams, MapView.Active.Map);
});
But I don't know how to create layer only in range of BBOX
As far as I can see you do not select any features from the newly created feature class, thereby I would aim for the feature layers extend to create the bounding box from it.
Setting the extend of your WMTS layer will mostly require to look into the CIM, although I was lately looking into something similar and couldn’t find a possibility in the api to set an extent for service layers.