public void SetCamera( Layer layer, bool useSelectedFeatures )
Public Overloads Sub SetCamera( _ ByVal layer As Layer, _ Optional ByVal useSelectedFeatures As Boolean _ )
Parameters
- layer
- Layer
- useSelectedFeatures
public void SetCamera( Layer layer, bool useSelectedFeatures )
Public Overloads Sub SetCamera( _ ByVal layer As Layer, _ Optional ByVal useSelectedFeatures As Boolean _ )
Exception | Description |
---|---|
ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
//Zoom map frame to the extent of a single layer. //Perform on the worker thread await QueuedTask.Run(() => { //Reference MapFrame MapFrame mf = layout.FindElement("Map Frame") as MapFrame; //Reference map and layer Map m = mf.Map; FeatureLayer lyr = m.FindLayers("GreatLakes").First() as FeatureLayer; //Set the map frame extent to all features in the layer mf.SetCamera(lyr, false); });
Target Platforms: Windows 10, Windows 8.1, Windows 7