コード例 #1
0
		public Footer (ExtendedMap map, double pageHeight, double minimizedFooterY, double expandedFooterY)
		{
			_extendedMap = map;
			_uiHelper = new UIHelper ();
			_pageHeight = pageHeight;
			_minimizedFooterY = minimizedFooterY;
			_expandedFooterY = expandedFooterY;
			FooterMode = FooterMode.Hidden;

			var footerLayout = new RelativeLayout ();

			footerLayout.Children.Add (
				new FooterMaster(_extendedMap, _uiHelper, this),
				Constraint.RelativeToParent ((parent) => (parent.Width * 0)),
				Constraint.RelativeToParent ((parent) => (parent.Height * 0)),
				Constraint.RelativeToParent ((parent) => (parent.Width * 1)),
				Constraint.RelativeToParent ((parent) => (parent.Height * 0.15))
			);

			footerLayout.Children.Add (
				new FooterDetail(_uiHelper, _extendedMap, this),
				Constraint.RelativeToParent ((parent) => (parent.Width * 0)),
				Constraint.RelativeToParent ((parent) => (parent.Height * 0.149)),
				Constraint.RelativeToParent ((parent) => (parent.Width * 1)),
				Constraint.RelativeToParent ((parent) => (parent.Height * 1))
			);

			Content = footerLayout;
		}
コード例 #2
0
ファイル: Footer.cs プロジェクト: MIliev11/Samples
        public Footer(ExtendedMap map, double pageHeight, double minimizedFooterY, double expandedFooterY)
        {
            _extendedMap      = map;
            _uiHelper         = new UIHelper();
            _pageHeight       = pageHeight;
            _minimizedFooterY = minimizedFooterY;
            _expandedFooterY  = expandedFooterY;
            FooterMode        = FooterMode.Hidden;

            var footerLayout = new RelativeLayout();

            footerLayout.Children.Add(
                new FooterMaster(_extendedMap, _uiHelper, this),
                Constraint.RelativeToParent((parent) => (parent.Width * 0)),
                Constraint.RelativeToParent((parent) => (parent.Height * 0)),
                Constraint.RelativeToParent((parent) => (parent.Width * 1)),
                Constraint.RelativeToParent((parent) => (parent.Height * 0.15))
                );

            footerLayout.Children.Add(
                new FooterDetail(_uiHelper, _extendedMap, this),
                Constraint.RelativeToParent((parent) => (parent.Width * 0)),
                Constraint.RelativeToParent((parent) => (parent.Height * 0.149)),
                Constraint.RelativeToParent((parent) => (parent.Width * 1)),
                Constraint.RelativeToParent((parent) => (parent.Height * 1))
                );

            Content = footerLayout;
        }
コード例 #3
0
ファイル: App.cs プロジェクト: MIliev11/Samples
        View CreateMapContentView()
        {
            //Coordinates for the starting point of the map
            const double latitude  = 41.788081;
            const double longitude = -87.831573;

            var location = new Position(latitude, longitude);

            var _map = new ExtendedMap.Forms.Plugin.Abstractions.ExtendedMap(MapSpan.FromCenterAndRadius(location, Distance.FromMiles(15)))
            {
                IsShowingUser = true
            };

            _map.StyleId = "CustomMap";

            _map.ShareText = string.Format("This is a custom message text");

            _map.BindingContext = BindingContext;

            _map.SetBinding <ExtendedMapViewModel>(ExtendedMap.Forms.Plugin.Abstractions.ExtendedMap.CustomPinsProperty, x => x.SamplePins);

            var createMapContentView = new CustomMapContentView(_map);

            return(createMapContentView);
        }
コード例 #4
0
		public FooterMaster (ExtendedMap extendedMap, UIHelper uiHelper, Footer footer)
		{
			_extendedMap = extendedMap;
			_uiHelper = uiHelper;
			_footer = footer;

			Content = CreateFooter ();
		}
コード例 #5
0
		public CustomMapContentView (ExtendedMap extendedMap)
		{
			_extendedMap = extendedMap;

			_mapGrid = new RelativeLayout {BindingContext = this};

			Content = _mapGrid;
		}
コード例 #6
0
ファイル: FooterMaster.cs プロジェクト: MIliev11/Samples
        public FooterMaster(ExtendedMap extendedMap, UIHelper uiHelper, Footer footer)
        {
            _extendedMap = extendedMap;
            _uiHelper    = uiHelper;
            _footer      = footer;

            Content = CreateFooter();
        }
コード例 #7
0
		public FooterDetail (UIHelper uiHelper, ExtendedMap extendedMap, Footer footer)
		{
			_uiHelper = uiHelper;
			_extendedMap = extendedMap;
			_footer = footer;

			Content = CreateFooterDetails ();
		}
コード例 #8
0
        public FooterDetail(UIHelper uiHelper, ExtendedMap extendedMap, Footer footer)
        {
            _uiHelper    = uiHelper;
            _extendedMap = extendedMap;
            _footer      = footer;

            Content = CreateFooterDetails();
        }
コード例 #9
0
        public CustomMapContentView(ExtendedMap extendedMap)
        {
            _extendedMap = extendedMap;

            _mapGrid = new RelativeLayout {
                BindingContext = this
            };

            Content = _mapGrid;
        }
コード例 #10
0
ファイル: App.cs プロジェクト: patridge/Xamarin.Forms.Plugins
        View CreateMapContentView()
        {
            //Coordinates for the starting point of the map
            const double latitude = 41.788081;
            const double longitude = -87.831573;

            var location = new Position(latitude, longitude);

            var _map = new ExtendedMap.Forms.Plugin.Abstractions.ExtendedMap(MapSpan.FromCenterAndRadius(location, Distance.FromMiles(15))) { IsShowingUser = true };

            _map.StyleId = "CustomMap";

            _map.ShareText = string.Format("This is a custom message text");
            
            _map.BindingContext = BindingContext;

            _map.SetBinding<ExtendedMapViewModel>(ExtendedMap.Forms.Plugin.Abstractions.ExtendedMap.CustomPinsProperty, x => x.SamplePins);

            var createMapContentView = new CustomMapContentView(_map);

            return createMapContentView;
        }