private void mapControl1_MapItemClick(object sender, MapItemClickEventArgs e)
        {
            MapBubble a = e.Item as MapBubble;

            if (a != null)
            {
                MessageBox.Show(Convert.ToString(a));
            }
        }
示例#2
0
        private MapBubble CreateBubbleItem(double x, double y, int colorIndex)
        {
            MapBubble bubble = new MapBubble();

            bubble.Location = new GeoPoint(x, y);
            bubble.Value    = 60;
            bubble.Attributes.Add(new MapItemAttribute()
            {
                Name = "color", Value = string.Format("color{0}", colorIndex)
            });
            return(bubble);
        }
示例#3
0
        void mapControl_MapItemClick(object sender, MapItemClickEventArgs e)
        {
            MapBubble bubble = e.Item as MapBubble;

            if (bubble != null)
            {
                StoresLayer.SelectedItem = e.Item;
                HomeData.Items.Clear();
                var last = listStores.FindLast(q => q.Latitude == bubble.Location.GetY());
                if (last != null)
                {
                    HomeData.Items.Add(last.MapItem);
                }
            }
        }
示例#4
0
        public SCMap AddBubble(double[] location, int?size, BubbleOptions options = null)
        {
            if (location == null || location.Length != 2)
            {
                throw new Exception("Location must be double array with 2 elements.");
            }

            options ??= new BubbleOptions();

            var mapItem = new MapBubble()
            {
                Location = CreateCoordPoint(location[0], location[1])
            };

            if (size.HasValue)
            {
                mapItem.Size = size.Value;
            }

            options.ConfigureMapItem(this, mapItem);

            return(this);
        }