public static SimpleRenderer GetSimpleRenderer(ESRI.ArcGIS.Mapping.Core.GeometryType geometryType) { return(new SimpleRenderer() { Symbol = GetSymbol(geometryType) }); }
static Symbol GetSymbol(ESRI.ArcGIS.Mapping.Core.GeometryType geometryType) { Core.SymbolConfigProvider provider = ViewUtility.GetSymbolConfigProvider(); switch (geometryType) { case ESRI.ArcGIS.Mapping.Core.GeometryType.Point: case ESRI.ArcGIS.Mapping.Core.GeometryType.MultiPoint: return(new ESRI.ArcGIS.Mapping.Core.Symbols.ImageFillSymbol() { DisplayName = Resources.Strings.OrangeStickpin, Size = 20d, Source = "/ESRI.ArcGIS.Mapping.GP;component/Images/OrangeStickpin.png", OriginX = 0.5, OriginY = 1 }); case ESRI.ArcGIS.Mapping.Core.GeometryType.Polygon: return(new ESRI.ArcGIS.Client.FeatureService.Symbols.SimpleFillSymbol() { Fill = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromArgb(150, 255, 255, 255)), SelectionColor = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.Cyan) }); case ESRI.ArcGIS.Mapping.Core.GeometryType.Polyline: return(new ESRI.ArcGIS.Client.FeatureService.Symbols.SimpleLineSymbol() { Color = new SolidColorBrush(Colors.Red), SelectionColor = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.Cyan) }); } return(null); }
internal static GeometryType ToSlapiGeomType(ESRI.ArcGIS.Mapping.Core.GeometryType geomType) { switch (geomType) { case ESRI.ArcGIS.Mapping.Core.GeometryType.Point: return(ESRI.ArcGIS.Client.Tasks.GeometryType.Point); case ESRI.ArcGIS.Mapping.Core.GeometryType.MultiPoint: return(ESRI.ArcGIS.Client.Tasks.GeometryType.MultiPoint); case ESRI.ArcGIS.Mapping.Core.GeometryType.Polygon: return(ESRI.ArcGIS.Client.Tasks.GeometryType.Polygon); case ESRI.ArcGIS.Mapping.Core.GeometryType.Polyline: return(ESRI.ArcGIS.Client.Tasks.GeometryType.Polyline); } return(ESRI.ArcGIS.Client.Tasks.GeometryType.Envelope); }