Esempio n. 1
0
        public NMapCalloutOverlayView(Context context, NMapOverlay itemOverlay, NMapOverlayItem item, Rect itemBounds) : base(context)
        {
            mOverlayItem     = item;
            mItemBounds      = itemBounds;
            mOnClickListener = null;
            mItemOverlay     = itemOverlay;

            int px = 0;
            int py = (int)(mItemBounds.Height() * mOverlayItem.AnchorYRatio);

            NMapView.LayoutParams lp = new NMapView.LayoutParams(NMapView.LayoutParams.WrapContent,
                                                                 NMapView.LayoutParams.WrapContent,
                                                                 mOverlayItem.Point, px, -py,
                                                                 NMapView.LayoutParams.BottomCenter);
            this.LayoutParameters = lp;

            mMarginX = NMapResourceProvider.ToPixelFromDIP(CALLOUT_MARGIN_X);
        }
Esempio n. 2
0
 public void SetOnClickListener(NMapCalloutOverlay.IOnClickListener listener)
 {
     mOnClickListener = listener;
 }