public MyViewController()
 {
     dataGrid             = new SfDataGrid();
     busyIndicator        = new SFBusyIndicator();
     viewModel            = new ViewModel();
     dataGrid.ItemsSource = viewModel.Collection;
     dataGrid.ColumnSizer = ColumnSizer.Star;
     dataGrid.GridLoaded += DataGrid_GridLoaded;
     View.AddSubview(dataGrid);
 }
Beispiel #2
0
        //NSArray animationTypes = new NSArray ();

        public BusyIndicator_Mobile()
        {
            //BusyIndicator
            busyIndicator               = new SFBusyIndicator();
            busyIndicator.Foreground    = UIColor.FromRGB(36, 63, 217);
            busyIndicator.ViewBoxWidth  = 100;
            busyIndicator.ViewBoxHeight = 100;
            busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeBall;
            this.AddSubview(busyIndicator);

            mainPageDesign();
        }
Beispiel #3
0
 public OSM()
 {
     view       = new UIView();
     view.Frame = new CGRect(0, 0, 300, 400);
     AddMainView();
     busyindicator = new SFBusyIndicator();
     busyindicator.ViewBoxWidth  = 75;
     busyindicator.ViewBoxHeight = 75;
     busyindicator.Foreground    = UIColor.FromRGB(0x77, 0x97, 0x72); /*#779772*/
     busyindicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeSlicedCircle;
     IsConnectedToNetwork();
 }
Beispiel #4
0
        public BusyIndicator_Tablet()
        {
            //busyIndicator
            busyIndicator               = new SFBusyIndicator();
            busyIndicator.Foreground    = UIColor.FromRGB(36, 63, 217);
            busyIndicator.ViewBoxWidth  = 100;
            busyIndicator.ViewBoxHeight = 100;
            busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeBall;
            mainView.AddSubview(busyIndicator);

            this.AddSubview(mainView);
            this.loadOptionView();
        }
Beispiel #5
0
        void CreateBusyIndicator()
        {
            m_busyIndicator       = new SFBusyIndicator();
            m_busyIndicator.Frame = m_rect;

            m_busyIndicator.BackgroundColor = UIColor.Clear;
            m_busyIndicator.Foreground      = UIColor.Blue;
            m_busyIndicator.ViewBoxWidth    = 100;
            m_busyIndicator.ViewBoxHeight   = 100;
            SetBusyIndicatorType(m_data);

            ViewX = m_busyIndicator;
        }
        public BubbleVisualization()
        {
            SFMap maps = new SFMap();

            view          = new UIView();
            view.Frame    = new CGRect(0, 0, 300, 400);
            busyindicator = new SFBusyIndicator();
            busyindicator.ViewBoxWidth  = 75;
            busyindicator.ViewBoxHeight = 75;
            busyindicator.Foreground    = UIColor.FromRGB(0x77, 0x97, 0x72);            /*#779772*/
            busyindicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeSlicedCircle;
            view.AddSubview(busyindicator);
            label = new UILabel();
            label.TextAlignment = UITextAlignment.Center;
            label.Text          = "Top Population Countries With Bubbles";
            label.Font          = UIFont.SystemFontOfSize(18);
            label.Frame         = new  CGRect(0, 0, 300, 40);
            label.TextColor     = UIColor.Black;
            view.AddSubview(label);

            NSTimer.CreateScheduledTimer(TimeSpan.FromSeconds(0.3), delegate {
                maps.Frame = new CGRect(Frame.Location.X, 60, Frame.Size.Width - 6, Frame.Size.Height - 60);

                view.AddSubview(maps);
            });

            SFShapeFileLayer layer = new SFShapeFileLayer();

            layer.Uri = (NSString)NSBundle.MainBundle.PathForResource("world1", "shp");

            layer.DataSource = GetDataSource();

            SFBubbleMarkerSetting marker = new SFBubbleMarkerSetting();

            marker.MaxSize   = 75;
            marker.MinSize   = 55;
            marker.ValuePath = (NSString)"Population";
            SFShapeSetting shapeSettings = new SFShapeSetting();

            shapeSettings.valuePath   = (NSString)"Country";
            shapeSettings.Fill        = UIColor.FromRGB(0xA9, 0xD9, 0xF7);
            shapeSettings.StrokeColor = UIColor.White;
            layer.ShapeSettings       = shapeSettings;
            layer.ShowMapItems        = true;
            layer.BubbleMarkerSetting = marker;
            maps.Layers.Add(layer);
            AddSubview(view);
            maps.Delegate = new MapsBubbleDelegate(this);

            control = this;
        }
        public DataLabels()
        {
            smartLabelMode      = new UIPickerView();
            intersectActionMode = new UIPickerView();

            SFMap maps = new SFMap();

            view          = new UIView();
            view.Frame    = new CGRect(0, 0, 300, 400);
            busyindicator = new SFBusyIndicator();
            busyindicator.ViewBoxWidth  = 75;
            busyindicator.ViewBoxHeight = 75;
            busyindicator.Foreground    = UIColor.FromRGB(0x77, 0x97, 0x72); /*#779772*/
            busyindicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeSlicedCircle;
            view.AddSubview(busyindicator);

            NSTimer.CreateScheduledTimer(TimeSpan.FromSeconds(0.3), delegate {
                maps.Frame = new CGRect(Frame.Location.X, 60, Frame.Size.Width - 6, Frame.Size.Height - 60);

                view.AddSubview(maps);
            });

            layer = new SFShapeFileLayer();

            layer.Uri               = (NSString)NSBundle.MainBundle.PathForResource("usa_state", "shp");
            layer.ShapeIDPath       = (NSString)"Name";
            layer.ShapeIDTableField = (NSString)"STATE_NAME";
            layer.ShowMapItems      = true;
            layer.DataSource        = GetDataSource();

            SFShapeSetting shapeSettings = new SFShapeSetting();

            shapeSettings.ColorValuePath = (NSString)"Type";
            shapeSettings.ValuePath      = (NSString)"Name";
            shapeSettings.Fill           = UIColor.FromRGB(169, 217, 247);
            SetColorMapping(shapeSettings);
            layer.ShapeSettings = shapeSettings;

            SFDataLabelSetting dataLabelSetting = new SFDataLabelSetting();

            dataLabelSetting.SmartLabelMode     = IntersectAction.Trim;
            dataLabelSetting.IntersectionAction = IntersectAction.None;
            layer.DataLabelSettings             = dataLabelSetting;

            maps.Layers.Add(layer);
            AddSubview(view);
            CreateOptionView();
            this.OptionView = option;
            maps.Delegate   = new MapsDataLabelsDelegate(this);
        }
		public BubbleVisualization ()
		{
			SFMap maps = new SFMap ();
			view = new UIView ();
			view.Frame=new CGRect(0,0,300,400);
			busyindicator = new SFBusyIndicator ();
			busyindicator.ViewBoxWidth=75;
			busyindicator.ViewBoxHeight=75;
			busyindicator.Foreground=  UIColor.FromRGB (0x77, 0x97, 0x72);  /*#779772*/
			busyindicator.AnimationType=SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeSlicedCircle;
			view.AddSubview (busyindicator);
			label = new UILabel ();
			label.TextAlignment = UITextAlignment.Center;
			label.Text = "Top Population Countries With Bubbles";
			label.Font = UIFont.SystemFontOfSize (18);
			label.Frame=new  CGRect(0,0,300,40);
			label.TextColor = UIColor.Black;
			view.AddSubview (label);

			NSTimer.CreateScheduledTimer (TimeSpan.FromSeconds (0.3), delegate {
				maps.Frame = new CGRect(Frame.Location.X,60,Frame.Size.Width-6,Frame.Size.Height-60);

				view.AddSubview (maps);
			});

			SFShapeFileLayer layer = new SFShapeFileLayer ();
		
			layer.Uri = (NSString)NSBundle.MainBundle.PathForResource ("world1", "shp");

			layer.DataSource = GetDataSource();

			SFBubbleMarkerSetting marker = new SFBubbleMarkerSetting ();
			marker.MaxSize = 75;
			marker.MinSize = 55;
			marker.ValuePath = (NSString)"Population";
			SFShapeSetting shapeSettings = new SFShapeSetting ();
			shapeSettings.valuePath = (NSString)"Country";
			shapeSettings.Fill = UIColor.FromRGB (0xA9,0xD9,0xF7);
			shapeSettings.StrokeColor = UIColor.White;
			layer.ShapeSettings = shapeSettings;
			layer.ShowMapItems = true;
			layer.BubbleMarkerSetting = marker;
			maps.Layers.Add (layer);
			AddSubview (view);
			maps.Delegate = new MapsBubbleDelegate (this);

			control = this;
		}
Beispiel #9
0
        public ColorMapping()
        {
            SFMap maps = new SFMap();

            view          = new UIView();
            busyindicator = new SFBusyIndicator();
            busyindicator.ViewBoxWidth  = 75;
            busyindicator.ViewBoxHeight = 75;
            busyindicator.Foreground    = UIColor.FromRGB(0x77, 0x97, 0x72);            /*#779772*/
            busyindicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeSlicedCircle;
            view.AddSubview(busyindicator);

            NSTimer.CreateScheduledTimer(TimeSpan.FromSeconds(0.3), delegate {
                maps.Frame = new CGRect(Frame.Location.X, 60, Frame.Size.Width - 6, Frame.Size.Height - 60);

                view.AddSubview(maps);
            });
            view.Frame          = new CGRect(0, 0, 300, 400);
            markerView          = new UIView();
            label               = new UILabel();
            label.TextAlignment = UITextAlignment.Center;
            label.Text          = "Primary Agricultural Activity of USA";
            label.Font          = UIFont.SystemFontOfSize(18);
            label.Frame         = new  CGRect(0, 0, 300, 40);
            label.TextColor     = UIColor.Black;
            view.AddSubview(label);



            layer            = new SFShapeFileLayer();
            layer.Uri        = (NSString)NSBundle.MainBundle.PathForResource("usa_state", "shp");
            layer.DataSource = GetDataSource();
            SetColorMapping(layer.ShapeSettings);
            layer.ShapeSettings.ColorValuePath = (NSString)"Type";
            layer.ShapeSettings.StrokeColor    = UIColor.White;
            layer.LegendSettings            = new SFMapLegendSettings();
            layer.LegendSettings.Position   = new CGPoint(5, 75);
            layer.LegendSettings.ShowLegend = true;
            layer.EnableSelection           = true;
            maps.Layers.Add(layer);
            AddSubview(view);
            maps.Delegate = new MapsColorMappingDelegate(this);

            this.control = this;
        }
		public ColorMapping ()
		{
			SFMap	maps = new SFMap ();
			view = new UIView ();
			busyindicator = new SFBusyIndicator ();
			busyindicator.ViewBoxWidth=75;
			busyindicator.ViewBoxHeight=75;
			busyindicator.Foreground=  UIColor.FromRGB (0x77, 0x97, 0x72);  /*#779772*/
			busyindicator.AnimationType=SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeSlicedCircle;
			view.AddSubview (busyindicator);

			NSTimer.CreateScheduledTimer (TimeSpan.FromSeconds (0.3), delegate {
				maps.Frame = new CGRect(Frame.Location.X,60,Frame.Size.Width-6,Frame.Size.Height-60);

				view.AddSubview (maps);
			});
			view.Frame=new CGRect(0,0,300,400);
			markerView = new UIView ();
			label = new UILabel ();
			label.TextAlignment = UITextAlignment.Center;
			label.Text = "Primary Agricultural Activity of USA";
			label.Font = UIFont.SystemFontOfSize (18);
			label.Frame=new  CGRect(0,0,300,40);
			label.TextColor = UIColor.Black;
			view.AddSubview (label);



			layer = new SFShapeFileLayer();
			layer.Uri = (NSString)NSBundle.MainBundle.PathForResource ("usa_state", "shp");
			layer.DataSource = GetDataSource ();
			SetColorMapping(layer.ShapeSettings);
			layer.ShapeSettings.ColorValuePath =(NSString)"Type";
			layer.ShapeSettings.StrokeColor = UIColor.White;
			layer.LegendSettings = new SFMapLegendSettings ();
			layer.LegendSettings.Position = new CGPoint (5, 75);
			layer.LegendSettings.ShowLegend = true;
			layer.EnableSelection = true;
			maps.Layers.Add (layer);
			AddSubview (view);
			maps.Delegate = new MapsColorMappingDelegate (this);

			this.control =this;
		}
Beispiel #11
0
        public LoadingOverlay(CGRect frame) : base(frame)
        {
            BackgroundColor  = UIColor.Black;
            Alpha            = 0.75f;
            AutoresizingMask = UIViewAutoresizing.All;

            nfloat labelHeight = 22;
            var    labelWidth  = Frame.Width - 20;

            var centerX = Frame.Width / 2;
            var centerY = Frame.Height / 2;

            var busyIndicator = new SFBusyIndicator
            {
                Duration        = 0.6f,
                Frame           = new CGRect(0, 0, Frame.Size.Width, Frame.Size.Height),
                ViewBoxWidth    = 70,
                ViewBoxHeight   = 70,
                Foreground      = UIColor.White,
                BackgroundColor = UIColor.Clear,
                AnimationType   = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeDoubleCircle
            };

            AddSubview(busyIndicator);

            var loadingLabel = new UILabel(new CGRect(
                                               centerX - (labelWidth / 2) + 5,
                                               centerY + 45,
                                               labelWidth,
                                               labelHeight
                                               ))
            {
                BackgroundColor  = UIColor.Clear,
                TextColor        = UIColor.White,
                Text             = "Cargando...",
                TextAlignment    = UITextAlignment.Center,
                AutoresizingMask = UIViewAutoresizing.All
            };

            AddSubview(loadingLabel);
        }
Beispiel #12
0
        public Drilldown()
        {
            maps = new SFMap();
            maps.EnableZooming = false;
            view = new UIView();

            view.Frame    = new CGRect(0, 0, 300, 400);
            busyindicator = new SFBusyIndicator();
            busyindicator.ViewBoxWidth  = 75;
            busyindicator.ViewBoxHeight = 75;
            busyindicator.Foreground    = UIColor.FromRGB(0x77, 0x97, 0x72); /*#779772*/
            busyindicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeSlicedCircle;
            view.AddSubview(busyindicator);

            layout       = new UIView();
            layout.Frame = new CGRect(0, 0, 300, 50);

            button                        = new UIButton();
            button.Frame                  = new CGRect(0, 0, 100, 50);
            button.TouchUpInside         += Button_TouchUpInside;
            button.BackgroundColor        = UIColor.Clear;
            button.UserInteractionEnabled = true;
            button.Hidden                 = true;

            view.AddSubview(button);

            label = new UILabel();
            label.TextAlignment = UITextAlignment.Center;
            label.Text          = "World Map";
            label.TextColor     = UIColor.Blue;
            label.Font          = UIFont.SystemFontOfSize(18);
            label.Frame         = new CGRect(0, 0, 100, 50);

            layout.AddSubview(label);

            label1 = new UILabel();
            label1.TextAlignment = UITextAlignment.Center;
            label1.Text          = " >> ";
            label1.Font          = UIFont.SystemFontOfSize(18);
            label1.Frame         = new CGRect(80, 0, 50, 50);

            layout.AddSubview(label1);

            label3 = new UILabel();
            label3.TextAlignment = UITextAlignment.Left;
            label3.Font          = UIFont.SystemFontOfSize(18);
            label3.Frame         = new CGRect(120, 0, 150, 50);

            layout.AddSubview(label3);
            layout.Hidden = true;
            AddSubview(layout);

            header = new UILabel();
            header.TextAlignment = UITextAlignment.Center;
            header.Text          = "Click on a shape to drill";
            header.Font          = UIFont.SystemFontOfSize(18);
            header.TextAlignment = UITextAlignment.Center;



            view.AddSubview(header);

            NSTimer.CreateScheduledTimer(TimeSpan.FromSeconds(0.3), delegate
            {
                maps.Frame = new CGRect(Frame.Location.X, 60, Frame.Size.Width - 6, Frame.Size.Height - 60);

                view.AddSubview(maps);
            });

            layer = new SFShapeFileLayer();

            layer.Uri               = (NSString)NSBundle.MainBundle.PathForResource("world-map", "shp");
            layer.ShapeIDPath       = (NSString)"country";
            layer.ShapeIDTableField = (NSString)"admin";
            layer.ShowMapItems      = true;
            layer.EnableSelection   = true;
            layer.DataSource        = GetDataSource();

            SFShapeSetting shapeSettings = new SFShapeSetting();

            shapeSettings.ColorValuePath = (NSString)"continent";
            SetColorMapping(shapeSettings);
            layer.ShapeSettings = shapeSettings;

            ObservableCollection <SFMapMarker> markers = new ObservableCollection <SFMapMarker>();

            LabelMarker marker1 = new LabelMarker();

            marker1.Name      = (NSString)"Asia";
            marker1.Latitude  = 63.34303378997662;
            marker1.Longitude = 102.07617561287645;
            markers.Add(marker1);

            LabelMarker marker2 = new LabelMarker();

            marker2.Name      = (NSString)"Australia";
            marker2.Latitude  = -25.74775493367931;
            marker2.Longitude = 136.80451417932431;
            markers.Add(marker2);

            LabelMarker marker3 = new LabelMarker();

            marker3.Name      = (NSString)"Africa";
            marker3.Latitude  = 19.025302093442327;
            marker3.Longitude = 15.157534554671087;
            markers.Add(marker3);

            LabelMarker marker4 = new LabelMarker();

            marker4.Name      = (NSString)"North America";
            marker4.Latitude  = 59.88893689676585;
            marker4.Longitude = -109.3359375;
            markers.Add(marker4);

            LabelMarker marker5 = new LabelMarker();

            marker5.Name      = (NSString)"Europe";
            marker5.Latitude  = 47.95121990866204;
            marker5.Longitude = 18.468749999999998;
            markers.Add(marker5);

            LabelMarker marker6 = new LabelMarker();

            marker6.Name      = (NSString)"South America";
            marker6.Latitude  = -6.64607562172573;
            marker6.Longitude = -55.54687499999999;
            markers.Add(marker6);

            layer.Markers = markers;

            SFShapeFileLayer layer1 = new SFShapeFileLayer();

            layer1.Uri               = (NSString)NSBundle.MainBundle.PathForResource("south-america", "shp");
            layer1.ShapeIDPath       = (NSString)"country";
            layer1.ShapeIDTableField = (NSString)"admin";

            SFShapeSetting shapeSettings1 = new SFShapeSetting();

            shapeSettings1.Fill  = UIColor.FromRGB(156, 51, 103);
            layer1.ShapeSettings = shapeSettings1;

            SFShapeFileLayer layer2 = new SFShapeFileLayer();

            layer2.Uri               = (NSString)NSBundle.MainBundle.PathForResource("north-america", "shp");
            layer2.ShapeIDPath       = (NSString)"country";
            layer2.ShapeIDTableField = (NSString)"admin";

            SFShapeSetting shapeSettings2 = new SFShapeSetting();

            shapeSettings2.Fill  = UIColor.FromRGB(193, 54, 100);
            layer2.ShapeSettings = shapeSettings2;

            SFShapeFileLayer layer3 = new SFShapeFileLayer();

            layer3.Uri               = (NSString)NSBundle.MainBundle.PathForResource("europe", "shp");
            layer3.ShapeIDPath       = (NSString)"country";
            layer3.ShapeIDTableField = (NSString)"admin";

            SFShapeSetting shapeSettings3 = new SFShapeSetting();

            shapeSettings3.Fill  = UIColor.FromRGB(98, 45, 108);
            layer3.ShapeSettings = shapeSettings3;

            SFShapeFileLayer layer4 = new SFShapeFileLayer();

            layer4.Uri               = (NSString)NSBundle.MainBundle.PathForResource("africa", "shp");
            layer4.ShapeIDPath       = (NSString)"country";
            layer4.ShapeIDTableField = (NSString)"admin";

            SFShapeSetting shapeSettings4 = new SFShapeSetting();

            shapeSettings4.Fill  = UIColor.FromRGB(128, 48, 106);
            layer4.ShapeSettings = shapeSettings4;

            SFShapeFileLayer layer5 = new SFShapeFileLayer();

            layer5.Uri               = (NSString)NSBundle.MainBundle.PathForResource("australia", "shp");
            layer5.ShapeIDPath       = (NSString)"country";
            layer5.ShapeIDTableField = (NSString)"admin";

            SFShapeSetting shapeSettings5 = new SFShapeSetting();

            shapeSettings5.Fill  = UIColor.FromRGB(42, 40, 112);
            layer5.ShapeSettings = shapeSettings5;

            SFShapeFileLayer layer6 = new SFShapeFileLayer();

            layer6.Uri               = (NSString)NSBundle.MainBundle.PathForResource("asia", "shp");
            layer6.ShapeIDPath       = (NSString)"country";
            layer6.ShapeIDTableField = (NSString)"admin";

            SFShapeSetting shapeSettings6 = new SFShapeSetting();

            shapeSettings6.Fill  = UIColor.FromRGB(70, 42, 109);
            layer6.ShapeSettings = shapeSettings6;

            maps.Layers.Add(layer);
            maps.Layers.Add(layer1);
            maps.Layers.Add(layer2);
            maps.Layers.Add(layer3);
            maps.Layers.Add(layer4);
            maps.Layers.Add(layer5);
            maps.Layers.Add(layer6);

            AddSubview(view);
            maps.Delegate = new MapsDrilldownDelegate(this);
        }
		//NSArray animationTypes = new NSArray ();

		public BusyIndicator()
		{

			busyIndicator = new SFBusyIndicator ();
			this.animationTypes.Add ((NSString)"Ball");
			this.animationTypes.Add ((NSString)"Battery");
			this.animationTypes.Add ((NSString)"DoubleCircle");
			this.animationTypes.Add ((NSString)"ECG");
			this.animationTypes.Add ((NSString)"Globe");
			this.animationTypes.Add ((NSString)"HorizontalPulsingBox");
			this.animationTypes.Add ((NSString)"MovieTimer");
			this.animationTypes.Add ((NSString)"Print");
			this.animationTypes.Add ((NSString)"Rectangle");
			this.animationTypes.Add ((NSString)"RollingBall");
			this.animationTypes.Add ((NSString)"SingleCircle");
			this.animationTypes.Add ((NSString)"SlicedCircle");
			this.animationTypes.Add ((NSString)"ZoomingTarget");


			busyIndicator.Foreground = UIColor.FromRGB (36,63,217);
			busyIndicator.ViewBoxWidth = 100;
			busyIndicator.ViewBoxHeight = 100;
			busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeBall;
			this.AddSubview (busyIndicator);


			label.Text="AnimationTypes";
			label.TextColor = UIColor.Black;
			this.AddSubview (label);



			textbutton.SetTitle("Ball", UIControlState.Normal);
			textbutton.HorizontalAlignment = UIControlContentHorizontalAlignment.Center;
			textbutton.BackgroundColor = UIColor.Clear;
			textbutton.SetTitleColor(UIColor.Black, UIControlState.Normal);
			textbutton.Hidden = false;
			textbutton.Layer.BorderColor = UIColor.FromRGB(246,246,246).CGColor;
			textbutton.Layer.BorderWidth = 4;
			textbutton.Layer.CornerRadius = 8;
			textbutton.TouchUpInside += ShowPicker;
			this.AddSubview (textbutton);

			PickerModel model = new PickerModel(this.animationTypes);
			model.PickerChanged += (sender, e) => {
				this.selectedType = e.SelectedValue;
				textbutton.SetTitle(selectedType, UIControlState.Normal);
				if(selectedType=="Ball"){
					busyIndicator.ViewBoxWidth = 70;
					busyIndicator.ViewBoxHeight = 70;
					busyIndicator.Foreground = UIColor.FromRGB (36,63,217);
					busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeBall;}
				else if(selectedType=="Battery"){
					busyIndicator.ViewBoxWidth = 70;
					busyIndicator.ViewBoxHeight = 70;
					busyIndicator.Foreground = UIColor.FromRGB(167,0,21);
					busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeBattery;}
				else if(selectedType=="DoubleCircle"){
					busyIndicator.ViewBoxWidth = 70;
					busyIndicator.ViewBoxHeight = 70;
					busyIndicator.Foreground = UIColor.FromRGB(149,140,123);
					busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeDoubleCircle;}
				else if(selectedType=="ECG"){
					busyIndicator.ViewBoxWidth = 70;
					busyIndicator.ViewBoxHeight = 70;
					busyIndicator.Foreground = UIColor.FromRGB(218,144,26);
					busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeECG;}
				else if(selectedType=="Globe"){
					busyIndicator.ViewBoxWidth=100;
					busyIndicator.ViewBoxHeight=100;
					busyIndicator.Foreground = UIColor.FromRGB(158,168,238);
					busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeGlobe;}
				else if(selectedType=="HorizontalPulsingBox"){
					busyIndicator.ViewBoxWidth=100;
					busyIndicator.ViewBoxHeight=100;
					busyIndicator.Foreground = UIColor.FromRGB(228,46,6);
					busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeHorizontalPulsingBox;}
				else if(selectedType=="MovieTimer"){
					busyIndicator.ViewBoxWidth=100;
					busyIndicator.ViewBoxHeight=100;
					busyIndicator.Foreground = UIColor.FromRGB(45,45,45);
					busyIndicator.SecondaryColor=UIColor.FromRGB(155,155,155);
					busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeMovieTimer;}
				else if(selectedType=="Print"){
					busyIndicator.ViewBoxWidth=70;
					busyIndicator.ViewBoxHeight=70;
					busyIndicator.Foreground = UIColor.FromRGB(94,111,248);
					busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypePrint;}
				else if(selectedType=="Rectangle"){
					busyIndicator.ViewBoxWidth=100;
					busyIndicator.ViewBoxHeight=100;
					busyIndicator.Foreground = UIColor.FromRGB(39,170,158);
					busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeRectangle;}
				else if(selectedType=="RollingBall"){
					busyIndicator.ViewBoxWidth=70;
					busyIndicator.ViewBoxHeight=70;
					busyIndicator.Foreground = UIColor.FromRGB(45,45,45);
					busyIndicator.SecondaryColor=UIColor.White;
					busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeRollingBall;}
				else if(selectedType=="SingleCircle"){
					busyIndicator.ViewBoxWidth = 70;
					busyIndicator.ViewBoxHeight = 70;
					busyIndicator.Foreground = UIColor.FromRGB(175,37,65);
					busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeSingleCircle;}
				else if(selectedType=="SlicedCircle"){
					busyIndicator.ViewBoxWidth = 70;
					busyIndicator.ViewBoxHeight = 70;
					busyIndicator.Foreground = UIColor.FromRGB(119,151,114);
					busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeSlicedCircle;}
				else if(selectedType=="ZoomingTarget"){
					busyIndicator.ViewBoxWidth = 70;
					busyIndicator.ViewBoxHeight = 70;
					busyIndicator.Foreground = UIColor.FromRGB(237,143,60);
					busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeZoomingTarget;}
			};



			picker.ShowSelectionIndicator = true;
			picker.Hidden = false;
			picker.Model = model;
			picker.BackgroundColor = UIColor.White;

			this.AddSubview (picker);



			button.SetTitle("Done\t", UIControlState.Normal);
			button.HorizontalAlignment = UIControlContentHorizontalAlignment.Right;
			button.BackgroundColor = UIColor.FromRGB(240,240,240);
			button.SetTitleColor(UIColor.Black, UIControlState.Normal);
			button.Hidden = false;
			button.TouchUpInside += HidePicker;
			this.AddSubview (button);



			this.BackgroundColor = UIColor.White;
			this.control = this;
			// Perform any additional setup after loading the view, typically from a nib.
		}
		public DataMarkers () 
		{

			view = new UIView ();
			busyindicator = new SFBusyIndicator ();
			busyindicator.ViewBoxWidth=75;
			busyindicator.ViewBoxHeight=75;
			busyindicator.Foreground=  UIColor.FromRGB (0x77, 0x97, 0x72);  /*#779772*/
			busyindicator.AnimationType=SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeSlicedCircle;
			view.AddSubview (busyindicator);

			NSTimer.CreateScheduledTimer (TimeSpan.FromSeconds (0.3), delegate {
				maps.Frame = new CGRect(Frame.Location.X,60,Frame.Size.Width-6,Frame.Size.Height-60);

				view.AddSubview (maps);
			});
			view.Frame=new CGRect(0,0,300,400);
			markerView = new UIView ();
			label = new UILabel ();
			label.TextAlignment = UITextAlignment.Center;
			label.Text = "Top Population Countries";
			label.Font = UIFont.SystemFontOfSize (18);
			label.Frame=new  CGRect(0,0,300,40);
			label.TextColor = UIColor.Black;
			view.AddSubview (label);

			maps =new SFMap ();

			SFShapeFileLayer layer = new SFShapeFileLayer ();
			layer.Uri = (NSString)NSBundle.MainBundle.PathForResource ("world1", "shp");
			PopulationMarker usa= new PopulationMarker();
			usa.Latitude =38.8833;
			usa.Name ="United States";
			usa.Longitude=-77.0167;
			usa.Population ="321,174,000";
			layer.Markers = new NSMutableArray ();
			layer.Markers.Add(usa);


			PopulationMarker brazil= new PopulationMarker();
			brazil.Latitude=-15.7833;
			brazil.Longitude=-47.8667;
			brazil.Name ="Brazil";
			brazil.Population= "204,436,000";
			layer.Markers.Add(brazil);


			PopulationMarker india= new PopulationMarker();
			india.Latitude=21.0000;
			india.Longitude=78.0000;
			india.Name ="India";
			india.Population ="1,272,470,000";
			layer.Markers.Add(india);


			PopulationMarker china= new PopulationMarker();
			china.Latitude=35.0000;
			china.Longitude=103.0000;
			china.Name ="China";
			china.Population = "1,370,320,000";
			layer.Markers.Add(china);



			PopulationMarker indonesia= new PopulationMarker();
			indonesia.Latitude=-6.1750;
			indonesia.Longitude=106.8283;
			indonesia.Name ="Indonesia";
			indonesia.Population="255,461,700";
			layer.Markers.Add(indonesia);
			maps.Delegate = new MapsDelegate (this);

			maps.Layers.Add (layer);

			AddSubview (view);
			control = this;


		}
        public Sublayer()
        {
            SFMap maps = new SFMap();

            view          = new UIView();
            view.Frame    = new CGRect(0, 0, 300, 400);
            busyindicator = new SFBusyIndicator();
            busyindicator.ViewBoxWidth  = 75;
            busyindicator.ViewBoxHeight = 75;
            busyindicator.Foreground    = UIColor.FromRGB(0x77, 0x97, 0x72); /*#779772*/
            busyindicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeSlicedCircle;
            view.AddSubview(busyindicator);
            label = new UILabel();
            label.TextAlignment = UITextAlignment.Center;
            label.Text          = "Samsung Semiconductor office locations in USA";
            label.Font          = UIFont.SystemFontOfSize(18);
            label.Frame         = new CGRect(0, 0, 400, 40);
            label.TextColor     = UIColor.Black;
            view.AddSubview(label);

            NSTimer.CreateScheduledTimer(TimeSpan.FromSeconds(0.3), delegate {
                maps.Frame = new CGRect(Frame.Location.X, 60, Frame.Size.Width - 6, Frame.Size.Height - 60);

                view.AddSubview(maps);
            });

            SFShapeFileLayer layer = new SFShapeFileLayer();

            layer.Uri               = (NSString)NSBundle.MainBundle.PathForResource("usa_state", "shp");
            layer.ShapeIDPath       = (NSString)"Name";
            layer.ShapeIDTableField = (NSString)"STATE_NAME";
            layer.ShowMapItems      = true;
            layer.DataSource        = GetDataSource();

            SFShapeSetting shapeSettings = new SFShapeSetting();

            shapeSettings.ValuePath       = (NSString)"Type";
            shapeSettings.Fill            = UIColor.FromRGB(229, 229, 229);
            shapeSettings.StrokeColor     = UIColor.FromRGB(208, 208, 208);
            shapeSettings.StrokeThickness = 2;
            layer.ShapeSettings           = shapeSettings;

            SFDataLabelSetting dataLabelSetting = new SFDataLabelSetting();

            dataLabelSetting.SmartLabelMode = IntersectAction.Trim;
            layer.DataLabelSettings         = dataLabelSetting;

            SFShapeFileLayer subLayer = new SFShapeFileLayer();

            subLayer.Uri = (NSString)NSBundle.MainBundle.PathForResource("Texas", "shp");

            SFMapMarker marker1 = new SFMapMarker();

            marker1.Latitude  = 32.870404;
            marker1.Longitude = -99.467014;
            subLayer.Markers.Add(marker1);

            SFShapeFileLayer subLayer1 = new SFShapeFileLayer();

            subLayer1.Uri = (NSString)NSBundle.MainBundle.PathForResource("California", "shp");

            SFMapMarker marker2 = new SFMapMarker();

            marker2.Latitude  = 38.778259;
            marker2.Longitude = -120.463228;
            subLayer1.Markers.Add(marker2);

            SFShapeSetting subshapeSettings = new SFShapeSetting();

            subshapeSettings.Fill            = UIColor.FromRGB(177, 216, 245);
            subshapeSettings.StrokeColor     = UIColor.FromRGB(141, 204, 244);
            subshapeSettings.StrokeThickness = 1;

            subLayer.ShapeSettings  = subshapeSettings;
            subLayer1.ShapeSettings = subshapeSettings;


            layer.Sublayers.Add(subLayer);
            layer.Sublayers.Add(subLayer1);
            maps.Layers.Add(layer);
            AddSubview(view);
            maps.Delegate = new MapsSublayerDelegate(this);
        }
Beispiel #16
0
        public DataMarkers()
        {
            view          = new UIView();
            busyindicator = new SFBusyIndicator();
            busyindicator.ViewBoxWidth  = 75;
            busyindicator.ViewBoxHeight = 75;
            busyindicator.Foreground    = UIColor.FromRGB(0x77, 0x97, 0x72);            /*#779772*/
            busyindicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeSlicedCircle;
            view.AddSubview(busyindicator);

            NSTimer.CreateScheduledTimer(TimeSpan.FromSeconds(0.3), delegate {
                maps.Frame = new CGRect(Frame.Location.X, 60, Frame.Size.Width - 6, Frame.Size.Height - 60);

                view.AddSubview(maps);
            });
            view.Frame          = new CGRect(0, 0, 300, 400);
            markerView          = new UIView();
            label               = new UILabel();
            label.TextAlignment = UITextAlignment.Center;
            label.Text          = "Top Population Countries";
            label.Font          = UIFont.SystemFontOfSize(18);
            label.Frame         = new  CGRect(0, 0, 300, 40);
            label.TextColor     = UIColor.Black;
            view.AddSubview(label);

            maps = new SFMap();

            SFShapeFileLayer layer = new SFShapeFileLayer();

            layer.Uri = (NSString)NSBundle.MainBundle.PathForResource("world1", "shp");
            PopulationMarker usa = new PopulationMarker();

            usa.Latitude   = 38.8833;
            usa.Name       = "United States";
            usa.Longitude  = -77.0167;
            usa.Population = "321,174,000";
            layer.Markers  = new NSMutableArray();
            layer.Markers.Add(usa);


            PopulationMarker brazil = new PopulationMarker();

            brazil.Latitude   = -15.7833;
            brazil.Longitude  = -47.8667;
            brazil.Name       = "Brazil";
            brazil.Population = "204,436,000";
            layer.Markers.Add(brazil);


            PopulationMarker india = new PopulationMarker();

            india.Latitude   = 21.0000;
            india.Longitude  = 78.0000;
            india.Name       = "India";
            india.Population = "1,272,470,000";
            layer.Markers.Add(india);


            PopulationMarker china = new PopulationMarker();

            china.Latitude   = 35.0000;
            china.Longitude  = 103.0000;
            china.Name       = "China";
            china.Population = "1,370,320,000";
            layer.Markers.Add(china);



            PopulationMarker indonesia = new PopulationMarker();

            indonesia.Latitude   = -6.1750;
            indonesia.Longitude  = 106.8283;
            indonesia.Name       = "Indonesia";
            indonesia.Population = "255,461,700";
            layer.Markers.Add(indonesia);
            maps.Delegate = new MapsDelegate(this);

            maps.Layers.Add(layer);

            AddSubview(view);
            control = this;
        }
Beispiel #17
0
        //NSArray animationTypes = new NSArray ();

        public BusyIndicator()
        {
            busyIndicator = new SFBusyIndicator();
            this.animationTypes.Add((NSString)"Ball");
            this.animationTypes.Add((NSString)"Battery");
            this.animationTypes.Add((NSString)"DoubleCircle");
            this.animationTypes.Add((NSString)"ECG");
            this.animationTypes.Add((NSString)"Globe");
            this.animationTypes.Add((NSString)"HorizontalPulsingBox");
            this.animationTypes.Add((NSString)"MovieTimer");
            this.animationTypes.Add((NSString)"Print");
            this.animationTypes.Add((NSString)"Rectangle");
            this.animationTypes.Add((NSString)"RollingBall");
            this.animationTypes.Add((NSString)"SingleCircle");
            this.animationTypes.Add((NSString)"SlicedCircle");
            this.animationTypes.Add((NSString)"ZoomingTarget");


            busyIndicator.Foreground    = UIColor.FromRGB(36, 63, 217);
            busyIndicator.ViewBoxWidth  = 100;
            busyIndicator.ViewBoxHeight = 100;
            busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeBall;
            this.AddSubview(busyIndicator);


            label.Text      = "AnimationTypes";
            label.TextColor = UIColor.Black;
            this.AddSubview(label);



            textbutton.SetTitle("Ball", UIControlState.Normal);
            textbutton.HorizontalAlignment = UIControlContentHorizontalAlignment.Center;
            textbutton.BackgroundColor     = UIColor.Clear;
            textbutton.SetTitleColor(UIColor.Black, UIControlState.Normal);
            textbutton.Hidden             = false;
            textbutton.Layer.BorderColor  = UIColor.FromRGB(246, 246, 246).CGColor;
            textbutton.Layer.BorderWidth  = 4;
            textbutton.Layer.CornerRadius = 8;
            textbutton.TouchUpInside     += ShowPicker;
            this.AddSubview(textbutton);

            PickerModel model = new PickerModel(this.animationTypes);

            model.PickerChanged += (sender, e) => {
                this.selectedType = e.SelectedValue;
                textbutton.SetTitle(selectedType, UIControlState.Normal);
                if (selectedType == "Ball")
                {
                    busyIndicator.ViewBoxWidth  = 70;
                    busyIndicator.ViewBoxHeight = 70;
                    busyIndicator.Foreground    = UIColor.FromRGB(36, 63, 217);
                    busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeBall;
                }
                else if (selectedType == "Battery")
                {
                    busyIndicator.ViewBoxWidth  = 70;
                    busyIndicator.ViewBoxHeight = 70;
                    busyIndicator.Foreground    = UIColor.FromRGB(167, 0, 21);
                    busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeBattery;
                }
                else if (selectedType == "DoubleCircle")
                {
                    busyIndicator.ViewBoxWidth  = 70;
                    busyIndicator.ViewBoxHeight = 70;
                    busyIndicator.Foreground    = UIColor.FromRGB(149, 140, 123);
                    busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeDoubleCircle;
                }
                else if (selectedType == "ECG")
                {
                    busyIndicator.ViewBoxWidth  = 70;
                    busyIndicator.ViewBoxHeight = 70;
                    busyIndicator.Foreground    = UIColor.FromRGB(218, 144, 26);
                    busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeECG;
                }
                else if (selectedType == "Globe")
                {
                    busyIndicator.ViewBoxWidth  = 100;
                    busyIndicator.ViewBoxHeight = 100;
                    busyIndicator.Foreground    = UIColor.FromRGB(158, 168, 238);
                    busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeGlobe;
                }
                else if (selectedType == "HorizontalPulsingBox")
                {
                    busyIndicator.ViewBoxWidth  = 100;
                    busyIndicator.ViewBoxHeight = 100;
                    busyIndicator.Foreground    = UIColor.FromRGB(228, 46, 6);
                    busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeHorizontalPulsingBox;
                }
                else if (selectedType == "MovieTimer")
                {
                    busyIndicator.ViewBoxWidth   = 100;
                    busyIndicator.ViewBoxHeight  = 100;
                    busyIndicator.Foreground     = UIColor.FromRGB(45, 45, 45);
                    busyIndicator.SecondaryColor = UIColor.FromRGB(155, 155, 155);
                    busyIndicator.AnimationType  = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeMovieTimer;
                }
                else if (selectedType == "Print")
                {
                    busyIndicator.ViewBoxWidth  = 70;
                    busyIndicator.ViewBoxHeight = 70;
                    busyIndicator.Foreground    = UIColor.FromRGB(94, 111, 248);
                    busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypePrint;
                }
                else if (selectedType == "Rectangle")
                {
                    busyIndicator.ViewBoxWidth  = 100;
                    busyIndicator.ViewBoxHeight = 100;
                    busyIndicator.Foreground    = UIColor.FromRGB(39, 170, 158);
                    busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeRectangle;
                }
                else if (selectedType == "RollingBall")
                {
                    busyIndicator.ViewBoxWidth   = 70;
                    busyIndicator.ViewBoxHeight  = 70;
                    busyIndicator.Foreground     = UIColor.FromRGB(45, 45, 45);
                    busyIndicator.SecondaryColor = UIColor.White;
                    busyIndicator.AnimationType  = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeRollingBall;
                }
                else if (selectedType == "SingleCircle")
                {
                    busyIndicator.ViewBoxWidth  = 70;
                    busyIndicator.ViewBoxHeight = 70;
                    busyIndicator.Foreground    = UIColor.FromRGB(175, 37, 65);
                    busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeSingleCircle;
                }
                else if (selectedType == "SlicedCircle")
                {
                    busyIndicator.ViewBoxWidth  = 70;
                    busyIndicator.ViewBoxHeight = 70;
                    busyIndicator.Foreground    = UIColor.FromRGB(119, 151, 114);
                    busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeSlicedCircle;
                }
                else if (selectedType == "ZoomingTarget")
                {
                    busyIndicator.ViewBoxWidth  = 70;
                    busyIndicator.ViewBoxHeight = 70;
                    busyIndicator.Foreground    = UIColor.FromRGB(237, 143, 60);
                    busyIndicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeZoomingTarget;
                }
            };



            picker.ShowSelectionIndicator = true;
            picker.Hidden          = false;
            picker.Model           = model;
            picker.BackgroundColor = UIColor.White;

            this.AddSubview(picker);



            button.SetTitle("Done\t", UIControlState.Normal);
            button.HorizontalAlignment = UIControlContentHorizontalAlignment.Right;
            button.BackgroundColor     = UIColor.FromRGB(240, 240, 240);
            button.SetTitleColor(UIColor.Black, UIControlState.Normal);
            button.Hidden         = false;
            button.TouchUpInside += HidePicker;
            this.AddSubview(button);



            this.BackgroundColor = UIColor.White;
            this.control         = this;
            // Perform any additional setup after loading the view, typically from a nib.
        }
Beispiel #18
0
        public BubbleVisualization()
        {
            SFMap maps = new SFMap();

            view          = new UIView();
            view.Frame    = new CGRect(0, 0, 300, 400);
            busyindicator = new SFBusyIndicator();
            busyindicator.ViewBoxWidth  = 75;
            busyindicator.ViewBoxHeight = 75;
            busyindicator.Foreground    = UIColor.FromRGB(0x77, 0x97, 0x72); /*#779772*/
            busyindicator.AnimationType = SFBusyIndicatorAnimationType.SFBusyIndicatorAnimationTypeSlicedCircle;
            view.AddSubview(busyindicator);
            label = new UILabel();
            label.TextAlignment = UITextAlignment.Center;
            label.Text          = "Top 40 Population Countries With Bubbles";
            label.Font          = UIFont.SystemFontOfSize(18);
            label.Frame         = new CGRect(0, 0, 400, 40);
            label.TextColor     = UIColor.Black;
            view.AddSubview(label);

            NSTimer.CreateScheduledTimer(TimeSpan.FromSeconds(0.3), delegate
            {
                maps.Frame = new CGRect(Frame.Location.X, 60, Frame.Size.Width - 6, Frame.Size.Height - 60);

                view.AddSubview(maps);
            });

            SFShapeFileLayer layer = new SFShapeFileLayer();

            layer.Uri               = (NSString)NSBundle.MainBundle.PathForResource("world1", "shp");
            layer.ShapeIDPath       = (NSString)"Country";
            layer.ShapeIDTableField = (NSString)"NAME";
            layer.ShowMapItems      = true;
            layer.DataSource        = GetDataSource();

            SFShapeSetting shapeSettings = new SFShapeSetting();

            shapeSettings.Fill  = UIColor.LightGray;
            layer.ShapeSettings = shapeSettings;

            SFBubbleMarkerSetting marker = new SFBubbleMarkerSetting();

            marker.ValuePath      = (NSString)"Population";
            marker.ColorValuePath = (NSString)"Population";

            ObservableCollection <SFMapColorMapping> colorMappings = new ObservableCollection <SFMapColorMapping>();

            SFRangeColorMapping rangeColorMapping1 = new SFRangeColorMapping();

            rangeColorMapping1.To          = 1400000000;
            rangeColorMapping1.From        = 325000000;
            rangeColorMapping1.LegendLabel = (NSString)"Above 4%";
            rangeColorMapping1.Color       = UIColor.FromRGB(46, 118, 159);
            colorMappings.Add(rangeColorMapping1);

            SFRangeColorMapping rangeColorMapping2 = new SFRangeColorMapping();

            rangeColorMapping2.To          = 325000000;
            rangeColorMapping2.From        = 180000000;
            rangeColorMapping2.LegendLabel = (NSString)"4% - 2%";
            rangeColorMapping2.Color       = UIColor.FromRGB(216, 68, 68);
            colorMappings.Add(rangeColorMapping2);

            SFRangeColorMapping rangeColorMapping3 = new SFRangeColorMapping();

            rangeColorMapping3.To          = 180000000;
            rangeColorMapping3.From        = 100000000;
            rangeColorMapping3.LegendLabel = (NSString)"2% - 1%";
            rangeColorMapping3.Color       = UIColor.FromRGB(129, 111, 40);
            colorMappings.Add(rangeColorMapping3);

            SFRangeColorMapping rangeColorMapping4 = new SFRangeColorMapping();

            rangeColorMapping4.To          = 100000000;
            rangeColorMapping4.From        = 5000000;
            rangeColorMapping4.LegendLabel = (NSString)"Below 1%";
            rangeColorMapping4.Color       = UIColor.FromRGB(127, 56, 160);
            colorMappings.Add(rangeColorMapping4);

            marker.ColorMappings      = colorMappings;
            layer.BubbleMarkerSetting = marker;

            SFMapLegendSettings mapLegendSettings = new SFMapLegendSettings();

            mapLegendSettings.ShowLegend = true;
            mapLegendSettings.LegendType = LegendType.Bubbles;
            mapLegendSettings.IconSize   = new CGSize(15, 15);
            mapLegendSettings.Position   = new CGPoint(50, 5);
            mapLegendSettings.TextSize   = 15;
            layer.LegendSettings         = mapLegendSettings;

            maps.Layers.Add(layer);
            AddSubview(view);
            maps.Delegate = new MapsBubbleDelegate(this);
        }