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


C# NET.RectLatLng类代码示例

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


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


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