public MarkerSymbol GetProportionalSymbol(int count, GeoStatus status) { return(new SimpleMarkerSymbol() { Style = SimpleMarkerStyle.Circle, Color = DefaultSettings.GetColor(status), Size = MinSize + StepSize * Math.Min(count, MaxNumber) }); }
static public Symbol GetSymbol(GeoMarkerType type, GeoStatus status) { if (type == GeoMarkerType.Point) { return(new SimpleMarkerSymbol() { Style = DefaultMarkerStyle, Color = DefaultSettings.GetColor(status), Size = DefaultMarkerSize }); } else if (type == GeoMarkerType.Line) { return(new SimpleLineSymbol() { Style = DefaultLineStyle, Color = DefaultSettings.GetColor(status), Width = DefaultLineWidth }); } else if (type == GeoMarkerType.Fill) { return(new SimpleFillSymbol() { Style = DefaultFillStyle, Color = status == GeoStatus.Hilight ? Colors.Gold : DefaultSettings.GetColor(status), Outline = new SimpleLineSymbol() { Style = SimpleLineStyle.Solid, Color = DefaultSettings.GetColor(status), Width = DefaultLineWidth } }); } return(null); }
/// <summary> /// Initializes a new instance of the <see cref="GeoResponse"/> class. /// </summary> internal GeoResponse(JsonGeoData json) { this.Status = json.status; List <GeoResult> results = new List <GeoResult>(); if (this.Status == GeoStatus.OK) { foreach (var r in json.results) { List <GeoAddress> addressComponents = new List <GeoAddress>(r.address_components.Length); foreach (var ac in r.address_components) { addressComponents.Add(new GeoAddress { LongName = ac.long_name, ShortName = ac.short_name, Types = ac.types }); } Geometry geometry = new Geometry { Bounds = (r.geometry.bounds == null) ? null : new GeoBounds { NorthEast = new GeoLocation { Latitude = r.geometry.bounds.northeast.lat, Longitude = r.geometry.bounds.northeast.lng }, SouthWest = new GeoLocation { Latitude = r.geometry.bounds.southwest.lat, Longitude = r.geometry.bounds.southwest.lng } }, Location = new GeoLocation { Latitude = r.geometry.location.lat, Longitude = r.geometry.location.lng }, LocationType = r.geometry.location_type, Viewport = new GeoBounds { NorthEast = new GeoLocation { Latitude = r.geometry.viewport.northeast.lat, Longitude = r.geometry.viewport.northeast.lng }, SouthWest = new GeoLocation { Latitude = r.geometry.viewport.southwest.lat, Longitude = r.geometry.viewport.southwest.lng } } }; results.Add(new GeoResult { AddressComponents = addressComponents, FormattedAddress = r.formatted_address, Geometry = geometry, PartialMatch = r.partial_match, Types = r.types }); } } this.Results = results; }
void AddGraphic(MapPoint point, string attr, int prop, GeoStatus status) { if (_layerInfo.MarkerType == MapEventLayer.EventMarkerType.Marker) { AddGraphic(point, attr, _layerInfo.GetSymbol(status)); } else { AddGraphic(point, attr, _layerInfo.GetProportionalSymbol(prop, status)); } }
public MarkerSymbol GetSymbol(GeoStatus status) { if (PictureMarkerSymbols != null) { return(PictureMarkerSymbols[status]); } return(new SimpleMarkerSymbol() { Style = DefaultStyle, Color = DefaultSettings.GetColor(status), Size = DefaultSize }); }
static public MarkerSymbol GetSymbol(GeoStatus status) { var symbol = new PictureMarkerSymbol(); if (status == GeoStatus.Normal) { symbol.SetSourceAsync(new System.Uri("http://static.arcgis.com/images/Symbols/Basic/GreenShinyPin.png")); } else if (status == GeoStatus.Hilight) { symbol.SetSourceAsync(new System.Uri("http://static.arcgis.com/images/Symbols/Basic/GoldShinyPin.png")); } if (status == GeoStatus.Reference) { symbol.SetSourceAsync(new System.Uri("http://static.arcgis.com/images/Symbols/Basic/BlueShinyPin.png")); } return(symbol); }
static public Symbol GetSymbol(GeoMarkerType type, GeoStatus status) { if (type == GeoMarkerType.Point) { return(new SimpleMarkerSymbol() { Style = DefaultMarkerStyle, Color = DefaultSettings.GetColor(status), Size = DefaultMarkerSize }); } else if (type == GeoMarkerType.Line) { return(new SimpleLineSymbol() { Style = DefaultLineStyle, Color = DefaultSettings.GetColor(status), Width = DefaultLineWidth }); } return(null); }
static public Color GetColor(GeoStatus status) { return(colorList[status]); }