本文整理汇总了C#中Layer.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# Layer.GetValue方法的具体用法?C# Layer.GetValue怎么用?C# Layer.GetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Layer
的用法示例。
在下文中一共展示了Layer.GetValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetInitialUpdateFailed
public static bool GetInitialUpdateFailed(Layer layer)
{
if (layer == null)
{
throw new ArgumentNullException("layer");
}
return (bool)layer.GetValue(ESRI.ArcGIS.Client.Extensibility.LayerExtensions.InitialUpdateFailedProperty);
}
示例2: GetIsSelected
public static bool GetIsSelected(Layer layer)
{
if (layer == null)
{
throw new ArgumentNullException("layer");
}
return (bool)layer.GetValue(IsSelectedProperty);
}
示例3: GetIsVisibleInMapContents
/// <summary>
/// Gets whether the layer is visible in the application's list of map contents
/// </summary>
/// <param name="layer">The layer to get visibility for</param>
/// <returns>True if the layer is visible, false if not</returns>
public static bool GetIsVisibleInMapContents(Layer layer)
{
if (layer == null)
{
throw new ArgumentNullException("layer");
}
return (bool)layer.GetValue(IsVisibleInMapContentsProperty);
}
示例4: GetDisplayUrl
public static string GetDisplayUrl(Layer layer)
{
if (layer == null)
{
throw new ArgumentNullException("layer");
}
return (string)layer.GetValue(DisplayUrlProperty);
}
示例5: GetErrorMessage
public static string GetErrorMessage(Layer layer)
{
if (layer == null)
{
throw new ArgumentNullException("layer");
}
return (string)layer.GetValue(ESRI.ArcGIS.Client.Extensibility.LayerExtensions.ErrorMessageProperty);
}
示例6: Convert
public static string Convert(Layer layer)
{
if (layer != null)
{
string displayName = layer.GetValue(ESRI.ArcGIS.Client.Extensibility.MapApplication.LayerNameProperty) as string;
if (!string.IsNullOrEmpty(displayName))
{
return displayName;
}
return layer.ID;
}
return null;
}
示例7: AddHeatMapLayer
public static void AddHeatMapLayer(Layer layer, View view)
{
Map map = view.Map;
string originalTitle = string.Empty;
originalTitle = layer.GetValue(ESRI.ArcGIS.Client.Extensibility.MapApplication.LayerNameProperty) as string;
FeatureLayer featureLayer = layer as FeatureLayer;
if (featureLayer != null && !string.IsNullOrEmpty(featureLayer.Url))
{
HeatMapFeatureLayer heatMapFeatureLayer = new HeatMapFeatureLayer();
heatMapFeatureLayer.DisableClientCaching = featureLayer.DisableClientCaching;
heatMapFeatureLayer.Geometry = featureLayer.Geometry;
heatMapFeatureLayer.ProxyUrl = featureLayer.ProxyUrl;
heatMapFeatureLayer.Text = featureLayer.Text;
heatMapFeatureLayer.Token = featureLayer.Token;
heatMapFeatureLayer.Url = featureLayer.Url;
heatMapFeatureLayer.Where = featureLayer.Where;
heatMapFeatureLayer.MapSpatialReference = map.SpatialReference;
heatMapFeatureLayer.ID = "EsriHeatMapLayer__" + Guid.NewGuid().ToString("N");
foreach (Graphic item in featureLayer.Graphics)
{
ESRI.ArcGIS.Client.Geometry.MapPoint mapPoint = item.Geometry as ESRI.ArcGIS.Client.Geometry.MapPoint;
if (mapPoint != null)
heatMapFeatureLayer.HeatMapPoints.Add(mapPoint);
}
view.AddLayerToMap(heatMapFeatureLayer, true,
string.IsNullOrEmpty(originalTitle) ? Resources.Strings.HeatMap : string.Format(Resources.Strings.HeatMapTitle, originalTitle));
}
else
{
GraphicsLayer graphicsLayer = layer as GraphicsLayer;
if(graphicsLayer != null)
{
ESRI.ArcGIS.Client.Toolkit.DataSources.HeatMapLayer heatMapLayer = new Client.Toolkit.DataSources.HeatMapLayer();
foreach (Graphic item in graphicsLayer.Graphics)
{
ESRI.ArcGIS.Client.Geometry.MapPoint mapPoint = item.Geometry as ESRI.ArcGIS.Client.Geometry.MapPoint;
if (mapPoint != null)
heatMapLayer.HeatMapPoints.Add(mapPoint);
}
view.AddLayerToMap(heatMapLayer, true,
string.IsNullOrEmpty(originalTitle) ? Resources.Strings.HeatMap : string.Format(Resources.Strings.HeatMapTitle, originalTitle));
}
}
}
示例8: GetPopupTitleExpressions
/// <summary>
/// Gets the title expressions used to display the titles on a layer's popups.
/// </summary>
/// <param name="obj">The layer to set title expressions for</param>
/// <returns>Dictionary with integer keys and string values. Integer keys are layer ids: -1 for a GraphicLayer, otherwise Layer ID.
/// String values are format strings like this: "{NAME}: {POPULATION}"</returns>
public static IDictionary<int, string> GetPopupTitleExpressions(Layer obj)
{
if (obj == null) return null;// -1 is Graphic Layer, zero is a valid layer id.
return (Dictionary<int, string>)obj.GetValue(PopupTitleExpressionsProperty);
}
示例9: GetLayerName
/// <summary>
/// Gets the display name of the given layer
/// </summary>
/// <param name="layer">The layer to get the name of</param>
/// <returns>The layer name</returns>
public static string GetLayerName(Layer layer)
{
if (layer == null)
{
throw new ArgumentNullException("layer");
}
return (string)layer.GetValue(MapApplication.LayerNameProperty);
}
示例10: copyBaseLayerAttributes
private void copyBaseLayerAttributes(Layer source, Layer destination)
{
destination.ID = source.ID;
destination.Effect = source.Effect;
destination.Opacity = source.Opacity;
destination.Visible = source.Visible;
destination.MaximumResolution = source.MaximumResolution;
destination.MinimumResolution = source.MinimumResolution;
destination.SetValue(LayerExtensions.DisplayInLayerListProperty, source.GetValue(LayerExtensions.DisplayInLayerListProperty));
destination.SetValue(LayerExtensions.DisplayNameProperty, source.GetValue(LayerExtensions.DisplayNameProperty));
}
示例11: GetIdentifyLayerIds
public static Collection<int> GetIdentifyLayerIds(Layer layer)
{
if (layer == null)
{
throw new ArgumentNullException("layer");
}
Collection<int> layerIds = layer.GetValue(IdentifyLayerIdsProperty) as Collection<int>;
if (layerIds == null)
{
// Initialize on demand
layerIds = new Collection<int>();
SetIdentifyLayerIds(layer, layerIds);
}
return layerIds;
}
示例12: GetUsesProxy
public static bool GetUsesProxy(Layer obj)
{
return (bool)obj.GetValue(UsesProxyProperty);
}
示例13: GetRunLayerPostInitializationActions
public static bool GetRunLayerPostInitializationActions(Layer layer)
{
if (layer == null)
{
throw new ArgumentNullException("layer");
}
return (bool)layer.GetValue(RunLayerPostInitializationActionsProperty);
}
示例14: GetIsConfigurable
public static bool GetIsConfigurable(Layer layer)
{
if (layer == null)
{
throw new ArgumentNullException("layer");
}
return (bool)layer.GetValue(IsConfigurableProperty);
}
示例15: GetUsePopupFromWebMap
public static bool GetUsePopupFromWebMap(Layer obj)
{
return (bool)obj.GetValue(UsePopupFromWebMapProperty);
}