/// <summary> /// Initializes a new instance of the <see cref="SomeTestProject.MapMarker"/> class. /// </summary> /// <param name="location">Coordinate.</param> /// <param name="image">Bitmap.</param> /// <param name="alignment">Alignment.</param> public MapMarker(GeoCoordinate location, MapMarkerAlignmentType alignment, UIImage image) : base(UIButtonType.Custom){ _image = image; this.Location = location; _alignment = alignment; this.Frame = new System.Drawing.RectangleF (new System.Drawing.PointF (0, 0), image.Size); this.SetImage (image, UIControlState.Normal); this.SetImage (image, UIControlState.Highlighted); this.SetImage (image, UIControlState.Disabled); }
/// <summary> /// Initializes a new instance of the <see cref="SomeTestProject.MapMarker"/> class. /// </summary> /// <param name="location">Coordinate.</param> /// <param name="image">Bitmap.</param> /// <param name="alignment">Alignment.</param> public MapMarker(GeoCoordinate location, MapMarkerAlignmentType alignment, UIImage image) : base(UIButtonType.Custom) { _image = image; this.Location = location; _alignment = alignment; this.Frame = new System.Drawing.RectangleF(new System.Drawing.PointF(0, 0), image.Size); this.SetImage(image, UIControlState.Normal); this.SetImage(image, UIControlState.Highlighted); this.SetImage(image, UIControlState.Disabled); }
/// <summary> /// Initializes a new instance of the <see cref="OsmSharp.Android.UI.MapMarker"/> class. /// </summary> /// <param name="coordinate">Coordinate.</param> /// <param name="bitmap">Bitmap.</param> /// <param name="alignment">The alignment.</param> public MapMarker(Context context, GeoCoordinate location, MapMarkerAlignmentType alignment, global::Android.Graphics.Bitmap image) : base(context) { _location = location; _alignment = alignment; this.SetBackgroundColor(global::Android.Graphics.Color.Transparent); this.SetScaleType(ScaleType.Center); _image = image; this.SetImageBitmap(image); this.SetMinimumWidth(image.Width); this.SetMinimumHeight(image.Height); }
/// <summary> /// Initializes a new instance of the <see cref="SomeTestProject.MapMarker"/> class. /// </summary> /// <param name="location">Coordinate.</param> /// <param name="marker">Alignment.</param> public MapMarker (GeoCoordinate location, MapMarkerAlignmentType alignment) : this(location, alignment, MapMarker.GetDefaultImage()) { }
/// <summary> /// Initializes a new instance of the <see cref="OsmSharp.Android.UI.MapMarker"/> class. /// </summary> /// <param name="location">Coordinate.</param> /// <param name="alignment">The alignment.</param> public MapMarker(Context context, GeoCoordinate location, MapMarkerAlignmentType alignment) : this(context, location, alignment, MapMarker.GetDefaultImage()) { }
/// <summary> /// Initializes a new instance of the <see cref="OsmSharp.Android.UI.MapMarker"/> class. /// </summary> /// <param name="coordinate">Coordinate.</param> /// <param name="bitmap">Bitmap.</param> /// <param name="alignment">The alignment.</param> public MapMarker(Context context, GeoCoordinate location, MapMarkerAlignmentType alignment, global::Android.Graphics.Bitmap image) : base(context) { _location = location; _alignment = alignment; this.SetBackgroundColor (global::Android.Graphics.Color.Transparent); this.SetScaleType (ScaleType.Center); _image = image; this.SetImageBitmap (image); this.SetMinimumWidth (image.Width); this.SetMinimumHeight (image.Height); }