Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WFS210.UI.Marker"/> class.
        /// </summary>
        /// <param name="resourceUrl">Resource URL.</param>
        /// <param name="name">Name.</param>
        /// <param name="layout">Layout.</param>
        /// <param name="inlay">Inlay.</param>
        public Marker(string resourceUrl, string name, MarkerLayout layout, int inlay)
        {
            this.Layout = layout;

            Image = UIImage.FromBundle(resourceUrl);

            Layer          = new CALayer();
            Layer.Contents = Image.CGImage;
            var scale = Image.CurrentScale;

            Console.WriteLine(scale);
            Layer.Bounds = new CGRect(0, 0, Image.CGImage.Width / scale, Image.CGImage.Height / scale);

            Name = name;

            Inlay = inlay;
        }
Example #2
0
 public Marker(Context context, int resourceId, MarkerLayout ml)
 {
     _markerLayout = ml;
     npd           = (NinePatchDrawable)context.Resources.GetDrawable(resourceId);
     _bounds       = new Rect(0, 0, npd.IntrinsicWidth, npd.IntrinsicHeight);
 }