当前位置: 首页>>代码示例>>C#>>正文


C# NET.PointLatLng类代码示例

本文整理汇总了C#中GMap.NET.PointLatLng的典型用法代码示例。如果您正苦于以下问题:C# PointLatLng类的具体用法?C# PointLatLng怎么用?C# PointLatLng使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PointLatLng类属于GMap.NET命名空间,在下文中一共展示了PointLatLng类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: addPIN

        private void addPIN(PointLatLng point)
        {
            GMapOverlay markersOverlay = new GMapOverlay(gmap, "marker");
            this.marker = new GMapMarkerGoogleRed(point);
            markersOverlay.Markers.Add(marker);
            gmap.Overlays.Add(markersOverlay);

            marker.ToolTipText = this.article.mLink;
            marker.ToolTipMode = MarkerTooltipMode.Never;
        }
开发者ID:shank8,项目名称:CPTS-323,代码行数:10,代码来源:FeedMarker.cs

示例2: getDistance

        public double getDistance(PointLatLng p1, PointLatLng p2)
        {
            GMapRoute route = new GMapRoute("getDistance");
            route.Points.Add(p1);
            route.Points.Add(p2);
            double distance = route.Distance;
            route.Clear();
            route = null;

            return distance;
        }
开发者ID:nadar71,项目名称:Krea,代码行数:11,代码来源:GoogleMapControl.cs

示例3: getLatLong

        private PointLatLng getLatLong(PointD i_location)
        {
            PointLatLng coordinates;
            coordinates = new PointLatLng(i_location.X, i_location.Y);

            return coordinates;
        }
开发者ID:danielbz88,项目名称:DesignPatternsOrAndDaniel,代码行数:7,代码来源:EventLocationsForm.cs

示例4: button1_Click_1

        private void button1_Click_1(object sender, EventArgs e)
        {
            double lat1 = Double.Parse(textBox_latitude1.Text);
            double lon1 = Double.Parse(textBox_longitude1.Text);
            double lat2 = Double.Parse(textBox_latitude2.Text);
            double lon2 = Double.Parse(textBox_longitude2.Text);
            double lat3 = Double.Parse(textBox_latitude3.Text);
            double lon3 = Double.Parse(textBox_longitude3.Text);
            double lat4 = Double.Parse(textBox_latitude4.Text);
            double lon4 = Double.Parse(textBox_longitude4.Text);
            PointLatLng p1 = new PointLatLng(lat1, lon1);
            PointLatLng p2 = new PointLatLng(lat2, lon2);
            PointLatLng p3 = new PointLatLng(lat3, lon3);
            PointLatLng p4 = new PointLatLng(lat4, lon4);
            FlightPlanner.instance.polygongridmode = true;
            FlightPlanner.instance.drawnpolygon.Points.Add(p1);
            FlightPlanner.instance.drawnpolygon.Points.Add(p2);
            FlightPlanner.instance.drawnpolygon.Points.Add(p3);
            FlightPlanner.instance.drawnpolygon.Points.Add(p4);
            FlightPlanner.instance.drawnpolygonsoverlay.Polygons.Add(FlightPlanner.instance.drawnpolygon);


            /*List<PointLatLng> points = new List<PointLatLng>();
            PointLatLng p1 = new PointLatLng(lat1, lon1);
            PointLatLng p2 = new PointLatLng(lat2, lon2);
            PointLatLng p3 = new PointLatLng(lat3, lon3);
            PointLatLng p4 = new PointLatLng(lat4, lon4);
            points.Add(p1);
            points.Add(p2);
            points.Add(p3);
            points.Add(p4);
            GMap.NET.WindowsForms.GMapPolygon test = new GMap.NET.WindowsForms.GMapPolygon(points, "yolo");
            test.IsVisible = true;*/
        }
开发者ID:jackmaynard,项目名称:MissionPlanner,代码行数:34,代码来源:Rectangles_form.cs

示例5: GMapMarkerGzbx

 public GMapMarkerGzbx(PointLatLng p)
     : base(p) {
     Image = Resources.marker;
     ImageShadow = Resources.shadow50;
     Size = SizeSt = new Size(Image.Width, Image.Height);
     Offset = new Point(-10, -34);
 }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:7,代码来源:GMapMarkerGzbx.cs

示例6: GMapMarkerBDZ

 public GMapMarkerBDZ(PointLatLng p)
     : base(p) {
     Size = SizeSt = new Size(20, 20);
     Offset = new Point(-10, -10);
     Text = string.Empty;
     mFont = new Font(FontFamily.GenericSansSerif, 10, FontStyle.Bold);
 }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:7,代码来源:GMapMarkerBDZ.cs

示例7: RectLatLng

 public RectLatLng(PointLatLng location, SizeLatLng size)
 {
     this.lng = location.Lng;
      this.lat = location.Lat;
      this.widthLng = size.WidthLng;
      this.heightLat = size.HeightLat;
 }
开发者ID:Jeffiy,项目名称:ypmap,代码行数:7,代码来源:RectLatLng.cs

示例8: CustomMarker

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="p">The position of the marker</param>
 public CustomMarker(PointLatLng p, Image image)
     : base(p)
 {
     img = image;
     Size = img.Size;
     Offset = new System.Drawing.Point(-Size.Width / 2, -Size.Height / 2);
 }
开发者ID:ReNASAsense,项目名称:SmartCity,代码行数:11,代码来源:CustomMarker.cs

示例9: GMapMarkerBYQ

 public GMapMarkerBYQ(PointLatLng p)
     : base(p) {
     Size=SizeSt = new Size(15, 10);
     Offset = new Point(-7, -5);
     Text = string.Empty;
     mFont = new Font(FontFamily.GenericSansSerif, 8, FontStyle.Bold);
 }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:7,代码来源:GMapMarkerBYQ.cs

示例10: FindNearestMarker

        public static GMapMarker FindNearestMarker(this Collection<GMapMarker> source, PointLatLng point, Func<PointLatLng, PointLatLng, double> getDistance)
        {
            GMapMarker nearestMarker = null;
            double smallestDistance = double.PositiveInfinity;
            foreach (var marker in source)
            {
                if (marker.Position != point)
                {
                    var distance = getDistance(marker.Position, point);
                    if (distance < smallestDistance)
                    {
                        smallestDistance = distance;
                        nearestMarker = marker;
                    }
                }
            }

            if(double.IsPositiveInfinity(smallestDistance))
            {
                return null;
            }
            else
            {
                return nearestMarker;
            }
        }
开发者ID:neilguilfoyle1,项目名称:WellsForZoeGpsWellMapperDesktop,代码行数:26,代码来源:CollectionGMarkerHelper.cs

示例11: GMapMarkerRect

 public GMapMarkerRect(PointLatLng p)
     : base(p)
 {
     Pen.DashStyle = DashStyle.Dot;
     Size = new System.Drawing.Size(50, 50);
     Offset = new System.Drawing.Point(-Size.Width / 2, -Size.Height / 2 - 20);
 }
开发者ID:cooldragon1,项目名称:mw-wingui,代码行数:7,代码来源:common.cs

示例12: FeedMarker

 public FeedMarker(PointLatLng loc, Article art, GMapControl gmap)
 {
     location = loc;
     article = art;
     this.gmap = gmap;
     addPIN(location);
 }
开发者ID:shank8,项目名称:CPTS-323,代码行数:7,代码来源:FeedMarker.cs

示例13: GMapMarkerImage

        private Image img; /// <summary>

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="p">The position of the marker</param>
        public GMapMarkerImage(PointLatLng p, Image image)
            : base(p)
        {
            img = image;
            Size = img.Size;
            Offset = new System.Drawing.Point(-Size.Width, Size.Height / 7);
        }
开发者ID:akapetanovic,项目名称:MUAC,代码行数:17,代码来源:CustomMarker.cs

示例14: GMapCustomImageMarkerYellow

 public GMapCustomImageMarkerYellow(PointLatLng p)
     : base(p)
 {
     image = Image.FromFile("img/point_y.png");
     Size = new System.Drawing.Size(image.Width, image.Height);
     Offset = new Point( - (image.Width / 2), - (image.Height / 2));
 }
开发者ID:tatar1nro,项目名称:KKM_iMedia_Server,代码行数:7,代码来源:GMapCustomImageMarkerYellow.cs

示例15: BuildLineGT

         /// <summary>
         /// 创建线路杆塔点标记
         /// </summary>
         /// <param name="LineCode"></param>
         /// <returns></returns>
         static public List<GMapMarkerVector> BuildLineGT(string LineCode, string LineName) {
             IList<PS_gt> list = Client.ClientHelper.PlatformSqlMap.GetList<PS_gt>(string.Format("where Linecode='{0}' order by gtcode", LineCode));

             List<GMapMarkerVector> markers = new List<GMapMarkerVector>();
             GMapMarkerVector marker = null;
             GMapMarkerVector preMarker = null;
             foreach (PS_gt gt in list) {
                 PointF pf = new PointF((float)gt.gtLon, (float)gt.gtLat);
                 if (box.Contains(pf)) {
                     PointLatLng point = new PointLatLng(Convert.ToDouble(gt.gtLat), Convert.ToDouble(gt.gtLon));
                     if (gt.gtType.Contains("方杆")) 
                         marker = new GMapMarkerRect(point);
                     else
                         marker = new GMapMarkerVector(point);
                     if (preMarker != null) {
                         marker.ParentMarker = preMarker;
                         preMarker.NextMarker = marker;
                     }
                     preMarker = marker;
                     marker.ToolTipText = gt.gth + "\n" + LineName;
                     marker.Tag = gt;

                     markers.Add(marker);
                 }
             }

             return markers;
         }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:33,代码来源:MapBuilder.cs


注:本文中的GMap.NET.PointLatLng类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。