本文整理汇总了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;
}
示例2: MapInfo
public MapInfo(PureProjection Projection, RectLatLng Area, int Zoom, MapType Type)
{
this.Projection = Projection;
this.Area = Area;
this.Zoom = Zoom;
this.Type = Type;
}
示例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;
}
示例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;
}
示例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>();
}
示例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++;
}
}
}
示例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();
}
}
示例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();
}
}
示例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];
}
}
示例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)));
}
示例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));
}
示例12: RectLatLng
static RectLatLng()
{
Empty = new RectLatLng();
}
示例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;
}
示例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);
}
示例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;
}