本文整理汇总了C#中Envelope.ScaleBy方法的典型用法代码示例。如果您正苦于以下问题:C# Envelope.ScaleBy方法的具体用法?C# Envelope.ScaleBy怎么用?C# Envelope.ScaleBy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Envelope
的用法示例。
在下文中一共展示了Envelope.ScaleBy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadStateFromLaunchParams
//.........这里部分代码省略.........
}
_appState.SelectionIds = StringCollection.FromString(launchParams["selectionids"], ',');
if (_appState.Action == Action.FindAllWithin && String.IsNullOrEmpty(_appState.Proximity))
{
ShowError("When action is 'findallwithin' and selection IDs are provided, a proximity must also be specified or the application must have a default proximity defined");
}
if (_appState.Action != Action.Select)
{
_appState.SelectionManager.SelectTargets();
}
}
// zoom to the extent of the target and/or selection features
if (_appState.TargetIds.Count > 0 || _appState.SelectionIds.Count > 0)
{
Envelope extent = new Envelope();
if (_appState.TargetIds.Count > 0)
{
extent.ExpandToInclude(_appState.SelectionManager.GetExtent(FeatureType.Target));
}
if (_appState.SelectionIds.Count > 0)
{
extent.ExpandToInclude(_appState.SelectionManager.GetExtent(FeatureType.Selection));
}
if (!extent.IsNull)
{
extent.ScaleBy(1.2);
_appState.Extent = extent;
}
}
// === activemapid ===
if (launchParams.ContainsKey("activemapid"))
{
string activeMapId = launchParams["activemapid"];
if (_appState.TargetIds.Contains(activeMapId))
{
_appState.ActiveMapId = activeMapId;
}
}
// === activedataid ===
if (launchParams.ContainsKey("activedataid"))
{
_appState.ActiveDataId = launchParams["activedataid"];
}
else
{
if (_appState.ActiveMapId.Length > 0)
{
_appState.ActiveDataId = _appState.ActiveMapId;
}
}
// === query ===