当前位置: 首页>>代码示例>>C#>>正文


C# Layer.GetValue方法代码示例

本文整理汇总了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);
 }
开发者ID:Esri,项目名称:arcgis-viewer-silverlight,代码行数:8,代码来源:LayerExtensions.cs

示例2: GetIsSelected

 public static bool GetIsSelected(Layer layer)
 {
     if (layer == null)
     {
         throw new ArgumentNullException("layer");
     }
     return (bool)layer.GetValue(IsSelectedProperty);
 }
开发者ID:Esri,项目名称:arcgis-viewer-silverlight,代码行数:8,代码来源:LayerExtensions.cs

示例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);
 }
开发者ID:konglingjie,项目名称:arcgis-viewer-silverlight,代码行数:13,代码来源:LayerProperties.cs

示例4: GetDisplayUrl

 public static string GetDisplayUrl(Layer layer)
 {
     if (layer == null)
     {
         throw new ArgumentNullException("layer");
     }
     return (string)layer.GetValue(DisplayUrlProperty);
 }
开发者ID:konglingjie,项目名称:arcgis-viewer-silverlight,代码行数:8,代码来源:LayerExtensions.cs

示例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);
 }
开发者ID:Esri,项目名称:arcgis-viewer-silverlight,代码行数:8,代码来源:LayerExtensions.cs

示例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;
 }
开发者ID:Esri,项目名称:arcgis-viewer-silverlight,代码行数:13,代码来源:LayerDisplayNameConverter.cs

示例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));
                }
            }			
		}
开发者ID:konglingjie,项目名称:arcgis-viewer-silverlight,代码行数:46,代码来源:HeatMapFeatureLayerHelper.cs

示例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);
		}
开发者ID:konglingjie,项目名称:arcgis-viewer-silverlight,代码行数:11,代码来源:LayerProperties.cs

示例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);
 }
开发者ID:Esri,项目名称:arcgis-viewer-silverlight,代码行数:13,代码来源:MapApplication.cs

示例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));
 }
开发者ID:yulifengwx,项目名称:arcgis-viewer-silverlight,代码行数:11,代码来源:LayerCloneHelper.cs

示例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;
        }
开发者ID:konglingjie,项目名称:arcgis-viewer-silverlight,代码行数:18,代码来源:LayerExtensions.cs

示例12: GetUsesProxy

 public static bool GetUsesProxy(Layer obj)
 {
     return (bool)obj.GetValue(UsesProxyProperty);
 }
开发者ID:konglingjie,项目名称:arcgis-viewer-silverlight,代码行数:4,代码来源:LayerExtensions.cs

示例13: GetRunLayerPostInitializationActions

 public static bool GetRunLayerPostInitializationActions(Layer layer)
 {
     if (layer == null)
     {
         throw new ArgumentNullException("layer");
     }
     return (bool)layer.GetValue(RunLayerPostInitializationActionsProperty);
 }
开发者ID:konglingjie,项目名称:arcgis-viewer-silverlight,代码行数:8,代码来源:LayerExtensions.cs

示例14: GetIsConfigurable

 public static bool GetIsConfigurable(Layer layer)
 {
     if (layer == null)
     {
         throw new ArgumentNullException("layer");
     }
     return (bool)layer.GetValue(IsConfigurableProperty);
 }
开发者ID:konglingjie,项目名称:arcgis-viewer-silverlight,代码行数:8,代码来源:LayerExtensions.cs

示例15: GetUsePopupFromWebMap

 public static bool GetUsePopupFromWebMap(Layer obj)
 {
     return (bool)obj.GetValue(UsePopupFromWebMapProperty);
 }
开发者ID:konglingjie,项目名称:arcgis-viewer-silverlight,代码行数:4,代码来源:LayerExtensions.cs


注:本文中的Layer.GetValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。