GMap.NET.Core/GMap.NET/RectLatLng.cs

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。


namespace GMap.NET
{
   using System;
   using System.Globalization;

   /// <summary>
   /// the rect of coordinates
   /// </summary>
   public struct RectLatLng
   {
      public static readonly RectLatLng Empty;
      private double lng;
      private double lat;
      private double widthLng;
      private double heightLat;

      public RectLatLng(double lat, double lng, double widthLng, double heightLat)
      {
         this.lng = lng;
         this.lat = lat;
         this.widthLng = widthLng;
         this.heightLat = heightLat;
      }

      public RectLatLng(PointLatLng location, SizeLatLng size)
      {
         this.lng = location.Lng;
         this.lat = location.Lat;
         this.widthLng = size.WidthLng;
         this.heightLat = size.HeightLat;
      }

      public static RectLatLng FromLTRB(double lng, double lat, double rightLng, double bottomLat)
      {
         return new RectLatLng(lat, lng, rightLng - lng, lat - bottomLat);
      }

      public PointLatLng LocationTopLeft
      {
         get
         {
            return new PointLatLng(this.Lat, this.Lng);
         }
         set
         {
            this.Lng = value.Lng;
            this.Lat = value.Lat;
         }
      }

      public PointLatLng LocationRightBottom
      {
         get
         {
            PointLatLng ret = new PointLatLng(this.Lat, this.Lng);
            ret.Offset(HeightLat, WidthLng);
            return ret;
         }
      }
后面还有 253 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。