• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# NET.RectLatLng类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: MapInfo

 public MapInfo(RectLatLng Area, int Zoom, GMapProvider Type, bool makeWorldFile)
 {
     this.Area = Area;
      this.Zoom = Zoom;
      this.Type = Type;
      this.MakeWorldFile = makeWorldFile;
 }
开发者ID:sarge,项目名称:Waikato-HAB,代码行数:7,代码来源:StaticImage.cs


示例2: MapInfo

 public MapInfo(PureProjection Projection, RectLatLng Area, int Zoom, MapType Type)
 {
     this.Projection = Projection;
      this.Area = Area;
      this.Zoom = Zoom;
      this.Type = Type;
 }
开发者ID:wrbrooks,项目名称:VB3,代码行数:7,代码来源:StaticImage.cs


示例3: RectLatLngCollide

 public static bool RectLatLngCollide(RectLatLng a, RectLatLng b)
 {
     if ((a.Left > b.Left && a.Left < b.Right) || (b.Left > a.Left && b.Left > a.Right))
     {
         if ((a.Top < b.Top && a.Top < b.Top) || (b.Top > a.Top && b.Top > a.Top))
         {
             return true;
         }
     }
     return false;
 }
开发者ID:skarlath,项目名称:spaceapps_MIAMI,代码行数:11,代码来源:OverlayProcessor.cs


示例4: activeData

 public GridDataPoints activeData(GridDataPoints allPoints, RectLatLng bounds, String id)
 {
     GridDataPoints activePoints = new GridDataPoints(id);
     foreach (GridDataPoint p in allPoints.points)
     {
         if (OverlayProcessor.RectLatLngCollide(p.loc,bounds))
         {
             activePoints.addPoint(p);
         }
     }
     return activePoints;
 }
开发者ID:skarlath,项目名称:spaceapps_MIAMI,代码行数:12,代码来源:OverlayProcessor.cs


示例5: GetMapData

 /// <summary>
 ///     Get the map data from the AA api service.
 ///     Required scopes: query_mapdata query_mapairdata
 /// </summary>
 /// <param name="latLongBounds">The bounds of the request.</param>
 /// <returns>A collection of GeoJSON features.</returns>
 public Task<AAFeatureCollection> GetMapData(RectLatLng latLongBounds)
 {
     return _apiUrl
         .AppendPathSegments("v2", "mapdata", "geojson")
         .SetQueryParams(new
         {
             n = latLongBounds.Top,
             e = latLongBounds.Right,
             s = latLongBounds.Bottom,
             w = latLongBounds.Left
         })
         .WithClient(_client)
         .GetJsonAsync<AAFeatureCollection>();
 }
开发者ID:ArduPilot,项目名称:MissionPlanner,代码行数:20,代码来源:AltitudeAngelClient.cs


示例6: GMapMarkerOverlapCount

        public GMapMarkerOverlapCount(PointLatLng p)
            : base(p)
        {
            area = new RectLatLng(p, SizeLatLng.Empty);

            if (colorbrushs == null)
            {
                colorbrushs = new SolidBrush[color.Length];
                int a = 0;
                foreach (var color1 in color)
                {
                    colorbrushs[a] = new SolidBrush(Color.FromArgb(140, color1.R, color1.G, color1.B));
                    a++;
                }
            }
        }
开发者ID:AndersonRayner,项目名称:MissionPlanner,代码行数:16,代码来源:GMapMarkerOverlapCount.cs


示例7: Start

        public void Start(RectLatLng area, PureProjection prj, int zoom, MapType type, int sleep)
        {
            if(!worker.IsBusy)
             {
            this.label1.Text = "...";
            this.progressBar1.Value = 0;

            this.prj = prj;
            this.area = area;
            this.zoom = zoom;
            this.type = type;
            this.sleep = sleep;

            GMaps.Instance.UseMemoryCache = false;

            worker.RunWorkerAsync();

            this.ShowDialog();
             }
        }
开发者ID:LeoTosti,项目名称:x-drone,代码行数:20,代码来源:TilePrefetcher.cs


示例8: Start

        public void Start(RectLatLng area, int zoom, GMapProvider provider, int sleep)
        {
            if(!worker.IsBusy)
             {
            this.label1.Text = "...";
            this.progressBarDownload.Value = 0;

            this.area = area;
            this.zoom = zoom;
            this.provider = provider;
            this.sleep = sleep;

            GMaps.Instance.UseMemoryCache = false;
            GMaps.Instance.CacheOnIdleRead = false;
            GMaps.Instance.BoostCacheEngine = true;

            worker.RunWorkerAsync();

            this.ShowDialog();
             }
        }
开发者ID:Jeffiy,项目名称:ypmap,代码行数:21,代码来源:TilePrefetcher.cs


示例9: SuperMapProjection

        public SuperMapProjection(double[] mapScales, MapParameter defaultMapParameter)
        {
            if (mapScales == null)
                throw new ArgumentNullException();
            if (defaultMapParameter == null)
            {
                throw new ArgumentNullException();
            }

            _mapScales = mapScales;
            _bounds = RectLatLng.FromLTRB(defaultMapParameter.Bounds.LeftBottom.X, 
                defaultMapParameter.Bounds.RightTop.Y, 
                defaultMapParameter.Bounds.RightTop.X, 
                defaultMapParameter.Bounds.LeftBottom.Y);

            if (defaultMapParameter.Bounds == null)
                throw new ArgumentNullException();
            _minX = defaultMapParameter.Bounds.LeftBottom.X;
            _minY = defaultMapParameter.Bounds.LeftBottom.Y;
            _maxX = defaultMapParameter.Bounds.RightTop.X;
            _maxY = defaultMapParameter.Bounds.RightTop.Y;

            if (defaultMapParameter.PrjCoordSys != null &&
                defaultMapParameter.PrjCoordSys.CoordSystem != null &&
                defaultMapParameter.PrjCoordSys.CoordSystem.Datum != null &&
                defaultMapParameter.PrjCoordSys.CoordSystem.Datum.Spheroid != null)
            {
                _axis = defaultMapParameter.PrjCoordSys.CoordSystem.Datum.Spheroid.Axis;
                _flattening = defaultMapParameter.PrjCoordSys.CoordSystem.Datum.Spheroid.Flatten;
            }

            double refMapScale = defaultMapParameter.Scale;
            double refResolution = (defaultMapParameter.ViewBounds.RightTop.X - defaultMapParameter.ViewBounds.LeftBottom.X) /
                (defaultMapParameter.Viewer.Width);
            _resolutions = new double[_mapScales.Length];
            for (int i = 0; i < _mapScales.Length; i++)
            {
                _resolutions[i] = refResolution * refMapScale / mapScales[i];
            }
        }
开发者ID:SuperMap,项目名称:iClient-for-DotNet,代码行数:40,代码来源:SuperMapProjection.cs


示例10: Contains

 public bool Contains(RectLatLng rect)
 {
     return ((((this.Lng <= rect.Lng) && ((rect.Lng + rect.WidthLng) <= (this.Lng + this.WidthLng))) && (this.Lat >= rect.Lat)) && ((rect.Lat - rect.HeightLat) >= (this.Lat - this.HeightLat)));
 }
开发者ID:Jeffiy,项目名称:ypmap,代码行数:4,代码来源:RectLatLng.cs


示例11: Union

 // ok ???
 // http://greatmaps.codeplex.com/workitem/15981
 public static RectLatLng Union(RectLatLng a, RectLatLng b)
 {
     return RectLatLng.FromLTRB(
     Math.Min(a.Left, b.Left),
     Math.Max(a.Top, b.Top),
     Math.Max(a.Right, b.Right),
     Math.Min(a.Bottom, b.Bottom));
 }
开发者ID:Jeffiy,项目名称:ypmap,代码行数:10,代码来源:RectLatLng.cs


示例12: RectLatLng

 static RectLatLng()
 {
     Empty = new RectLatLng();
 }
开发者ID:Jeffiy,项目名称:ypmap,代码行数:4,代码来源:RectLatLng.cs


示例13: Intersect

        // ok ???
        public static RectLatLng Intersect(RectLatLng a, RectLatLng b)
        {
            double lng = Math.Max(a.Lng, b.Lng);
             double num2 = Math.Min((double)(a.Lng + a.WidthLng), (double)(b.Lng + b.WidthLng));

             double lat = Math.Max(a.Lat, b.Lat);
             double num4 = Math.Min((double)(a.Lat + a.HeightLat), (double)(b.Lat + b.HeightLat));

             if((num2 >= lng) && (num4 >= lat))
             {
            return new RectLatLng(lat, lng, num2 - lng, num4 - lat);
             }
             return Empty;
        }
开发者ID:Jeffiy,项目名称:ypmap,代码行数:15,代码来源:RectLatLng.cs


示例14: GmapWidget_OnSelectionChange

 void GmapWidget_OnSelectionChange(RectLatLng Selection, bool ZoomToFit)
 {
     if (poligonSelection)
         return;
     var selected = addressesOverlay.Markers.Where(m => Selection.Contains(m.Position)).ToList();
     UpdateSelectedInfo(selected);
 }
开发者ID:QualitySolution,项目名称:Vodovoz,代码行数:7,代码来源:RoutesAtDayDlg.cs


示例15: LoadFile

            public bool LoadFile(string filename)
            {
                FileName = filename;

                log.InfoFormat("GeoTiff {0}", filename);

                using (Tiff tiff = Tiff.Open(filename, "r"))
                {
                    width = tiff.GetField(TiffTag.IMAGEWIDTH)[0].ToInt();
                    height = tiff.GetField(TiffTag.IMAGELENGTH)[0].ToInt();
                    bits = tiff.GetField(TiffTag.BITSPERSAMPLE)[0].ToInt();

                    if (bits != 16)
                        return false;

                    var modelscale = tiff.GetField(TiffTag.GEOTIFF_MODELPIXELSCALETAG);
                    var tiepoint = tiff.GetField(TiffTag.GEOTIFF_MODELTIEPOINTTAG);

                    i = BitConverter.ToDouble(tiepoint[1].ToByteArray(), 0);
                    j = BitConverter.ToDouble(tiepoint[1].ToByteArray(), 0 + 8);
                    k = BitConverter.ToDouble(tiepoint[1].ToByteArray(), 0 + 16);
                    x = BitConverter.ToDouble(tiepoint[1].ToByteArray(), 0 + 24);
                    y = BitConverter.ToDouble(tiepoint[1].ToByteArray(), 0 + 32);
                    z = BitConverter.ToDouble(tiepoint[1].ToByteArray(), 0 + 40);

                    log.InfoFormat("Tie Point ({0},{1},{2}) --> ({3},{4},{5})", i, j, k, x, y, z);

                    xscale = BitConverter.ToDouble(modelscale[1].ToByteArray(), 0);
                    yscale = BitConverter.ToDouble(modelscale[1].ToByteArray(), 0 + 8);
                    zscale = BitConverter.ToDouble(modelscale[1].ToByteArray(), 0 + 16);

                    log.InfoFormat("Scale ({0},{1},{2})", xscale, yscale, zscale);

                    Area = new RectLatLng(y, x, width*xscale, height*yscale);

                    log.InfoFormat("Coverage {0}", Area.ToString());

                    GeoTiff.index.Add(this);

                    /*

                short numberOfDirectories = tiff.NumberOfDirectories();
                for (short d = 0; d < numberOfDirectories; ++d)
                {
                    tiff.SetDirectory((short)d);

                    for (ushort t = ushort.MinValue; t < ushort.MaxValue; ++t)
                    {
                        TiffTag tag = (TiffTag)t;
                        FieldValue[] value = tiff.GetField(tag);
                        if (value != null)
                        {
                            for (int j2 = 0; j2 < value.Length; j2++)
                            {
                                Console.WriteLine("{0} : {1} : {2}", tag.ToString(), value[j2].Value.GetType().ToString(), value[j2].ToString());
                            }
                        }
                    }
                }
                     */
                }

                return true;
            }
开发者ID:markbanderson,项目名称:MissionPlanner,代码行数:64,代码来源:GeoTiff.cs


示例16: GetAreaTileList

        /// <summary>
        /// gets all tiles in rect at specific zoom
        /// </summary>
        public List<Point> GetAreaTileList(RectLatLng rect, int zoom, int padding)
        {
            List<Point> ret = new List<Point>();

            Point topLeft = FromPixelToTileXY(FromLatLngToPixel(rect.LocationTopLeft, zoom));
            Point rightBottom = FromPixelToTileXY(FromLatLngToPixel(rect.LocationRightBottom, zoom));

            for (int x = (topLeft.X - padding); x <= (rightBottom.X + padding); x++)
            {
                for (int y = (topLeft.Y - padding); y <= (rightBottom.Y + padding); y++)
                {
                    Point p = new Point(x, y);
                    if (!ret.Contains(p) && p.X >= 0 && p.Y >= 0)
                    {
                        ret.Add(p);
                    }
                }
            }
            ret.TrimExcess();

            return ret;
        }
开发者ID:helgef,项目名称:flysight,代码行数:25,代码来源:PureProjection.cs


示例17: GetPixel

        static PointF GetPixel(RectLatLng area, PointLatLngAlt loc, Size size) 
        {
            double lon =  loc.Lng;
            double lat = loc.Lat;

            double lonscale = (lon - area.Left) * (size.Width - 0) / (area.Right - area.Left) + 0;

            double latscale = (lat - area.Top) * (size.Height - 0) / (area.Bottom - area.Top) + 0;

            return new PointF((float)lonscale, (float)latscale);
        }
开发者ID:RabidCicada,项目名称:senior-design,代码行数:11,代码来源:LogMap.cs


示例18: SetZoomToFitRect

        /// <summary>
        /// sets zoom to max to fit rect
        /// </summary>
        /// <param name="rect">area</param>
        /// <returns></returns>
        public bool SetZoomToFitRect(RectLatLng rect)
        {
            int maxZoom = Core.GetMaxZoomToFitRect(rect);
             if(maxZoom > 0)
             {
            PointLatLng center = new PointLatLng(rect.Lat - (rect.HeightLat / 2), rect.Lng + (rect.WidthLng / 2));
            CurrentPosition = center;

            if(maxZoom > MaxZoom)
            {
               maxZoom = MaxZoom;
            }

            if(ZoomStep != maxZoom)
            {
               Zoom = maxZoom;
            }

            return true;
             }
             return false;
        }
开发者ID:ravcio,项目名称:MapNet,代码行数:27,代码来源:GMapControlNew.xaml.cs


示例19: IntersectsWith

 // ok ???
 public bool IntersectsWith(RectLatLng rect)
 {
     return ((((rect.Lng < (this.Lng + this.WidthLng)) && (this.Lng < (rect.Lng + rect.WidthLng))) && (rect.Lat < (this.Lat + this.HeightLat))) && (this.Lat < (rect.Lat + rect.HeightLat)));
 }
开发者ID:LeoTosti,项目名称:x-drone,代码行数:5,代码来源:RectLatLng.cs


示例20: Union

 // ok ???
 public static RectLatLng Union(RectLatLng a, RectLatLng b)
 {
     double lng = Math.Min(a.Lng, b.Lng);
      double num2 = Math.Max((double) (a.Lng + a.WidthLng), (double) (b.Lng + b.WidthLng));
      double lat = Math.Min(a.Lat, b.Lat);
      double num4 = Math.Max((double) (a.Lat + a.HeightLat), (double) (b.Lat + b.HeightLat));
      return new RectLatLng(lng, lat, num2 - lng, num4 - lat);
 }
开发者ID:LeoTosti,项目名称:x-drone,代码行数:9,代码来源:RectLatLng.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# WindowsForms.GMapControl类代码示例发布时间:2022-05-26
下一篇:
C# NET.PointLatLng类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap