本文整理汇总了C#中GPoint类的典型用法代码示例。如果您正苦于以下问题:C# GPoint类的具体用法?C# GPoint怎么用?C# GPoint使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GPoint类属于命名空间,在下文中一共展示了GPoint类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetSafeString
public string GetSafeString(GPoint pos)
{
#region -- source --
/*
TileLayer.prototype.differenceEngine=function(s,a)
{
var offset=0,result="",alen=a.length,v,p;
for(var i=0; i<alen; i++)
{
v=parseInt(a.charAt(i),10);
if(!isNaN(v))
{
offset+=v;
p=s.charAt(offset%s.length);
result+=p
}
}
return result
};
TileLayer.prototype.getSafeString=function(x,y,nmd)
{
var arg=x.toString()+y.toString()+((3*x)+y).toString();
if(nmd)
{
arg+=nmd
}
return this.differenceEngine(TileLayer._substring,arg)
};
*/
#endregion
var arg = pos.X.ToString() + pos.Y.ToString() + ((3 * pos.X) + pos.Y).ToString();
string ret = "&s=";
int offset = 0;
for(int i = 0; i < arg.Length; i++)
{
offset += int.Parse(arg[i].ToString());
ret += SecureStr[offset % SecureStr.Length];
}
return ret;
}
示例2: MakeTileImageUrl
string MakeTileImageUrl(GPoint pos, int zoom, string language)
{
// http://vec01.maps.yandex.ru/tiles?l=map&v=2.10.2&x=1494&y=650&z=11
// http://vec03.maps.yandex.net/tiles?l=skl&v=2.26.0&x=4663&y=2610&z=13&lang=ru-RU
return string.Format(UrlFormat, UrlServer, GetServerNum(pos, 4) + 1, Version, pos.X, pos.Y, zoom);
}
示例3: MakeTileImageUrl
string MakeTileImageUrl(GPoint pos, int zoom, string language)
{
//http://webrd04.is.autonavi.com/appmaptile?x=5&y=2&z=3&lang=zh_cn&size=1&scale=1&style=7
string url = string.Format(UrlFormat, pos.X, pos.Y, zoom);
Console.WriteLine("url:" + url);
return url;
}
示例4: MakeTileImageUrl
string MakeTileImageUrl(GPoint pos, int zoom, string language)
{
// http://web1.nearmap.com/maps/hl=en&x=37&y=19&z=6&nml=MapT&nmg=1&s=2KbhmZZ
// http://web1.nearmap.com/maps/hl=en&x=36&y=19&z=6&nml=MapT&nmg=1&s=2YKWhQi
return string.Format(UrlFormat, GetServerNum(pos, 3), pos.X, pos.Y, zoom);
}
示例5: MakeTileImageUrl
string MakeTileImageUrl(GPoint pos, int zoom, string language)
{
// http://web1.nearmap.com/maps/hl=en&x=18681&y=10415&z=15&nml=Map_&nmg=1&s=kY8lZssipLIJ7c5
// http://web1.nearmap.com/kh/v=nm&hl=en&x=20&y=8&z=5&nml=Map_&s=55KUZ
return string.Format(UrlFormat, GetServerNum(pos, 3), pos.X, pos.Y, zoom, GetSafeString(pos));
}
示例6: MakeTileImageUrl
string MakeTileImageUrl(GPoint pos, int zoom, string language)
{
// http://www.maps.lt/cache/ikartelv/map/_alllayers/L03/R00000037/C00000053.png
// http://www.maps.lt/arcgiscache/ikartelv/map/_alllayers/L02/R0000001c/C0000002a.png
return string.Format(UrlFormat, zoom, pos.Y, pos.X);
}
示例7: Tile
public Tile(int zoom, GPoint pos)
{
this.NotEmpty = true;
this.zoom = zoom;
this.pos = pos;
this.overlays = null;
this.OverlaysCount = 0;
}
示例8: MakeTileImageUrl
string MakeTileImageUrl(GPoint pos, int zoom, string language)
{
// http://web2.nearmap.com/maps/hl=en&x=14&y=8&z=5&nml=Vert&s=kdj00
// http://web2.nearmap.com/maps/hl=en&x=6&y=4&z=4&nml=Vert
// http://web2.nearmap.com/maps/hl=en&x=3&y=1&z=3&nml=Vert&s=2edd
return string.Format(UrlFormat, GetServerNum(pos, 4), pos.X, pos.Y, zoom, GetSafeString(pos));
}
示例9: MakeTileImageUrl
string MakeTileImageUrl(GPoint pos, int zoom, string language)
{
string sec1 = string.Empty; // after &x=...
string sec2 = string.Empty; // after &zoom=...
GetSecureWords(pos, out sec1, out sec2);
return string.Format(UrlFormat, UrlFormatServer, GetServerNum(pos, 4), UrlFormatRequest, Version, language, pos.X, sec1, pos.Y, zoom, sec2, Server);
}
示例10: CacheItemQueue
public CacheItemQueue(MapType Type, GPoint Pos, int Zoom, MemoryStream Img, CacheUsage cacheType)
{
this.Type = Type;
this.Pos = Pos;
this.Zoom = Zoom;
this.Img = Img;
this.CacheType = cacheType;
}
示例11: MakeTileImageUrl
string MakeTileImageUrl(GPoint pos, int zoom, string language)
{
// http://m4.mapserver.mapy.cz/army2/9_7d00000_8080000
long xx = pos.X << (28 - zoom);
long yy = ((((long)Math.Pow(2.0, (double)zoom)) - 1) - pos.Y) << (28 - zoom);
return string.Format(UrlFormat, GetServerNum(pos, 3) + 1, zoom, xx, yy);
}
示例12: MakeTileImageUrl
string MakeTileImageUrl(GPoint pos, int zoom, string language)
{
// ['base','ophoto','turist','army2']
// http://m1.mapserver.mapy.cz/base-n/3_8000000_8000000
long xx = pos.X << (28 - zoom);
long yy = ((((long)Math.Pow(2.0, (double)zoom)) - 1) - pos.Y) << (28 - zoom);
return string.Format(UrlFormat, GetServerNum(pos, 3) + 1, zoom, xx, yy);
}
示例13: MakeTileImageUrl
string MakeTileImageUrl(GPoint pos, int zoom, string language)
{
// http://dc1.maps.lt/cache/mapslt_25d_vkkp/map/_alllayers/L01/R00007194/C0000a481.png
int z = zoom;
if(zoom >= 10)
{
z -= 10;
}
return string.Format(UrlFormat, z, pos.Y, pos.X);
}
示例14: Fill
public void Fill(GPoint.PType fillType)
{
//Debug.Log ("filling the grid with" + fillType);
//this method DOES NOT start at the 0,0 origin but rather at xymin and ends at xymax;
for (float ix = xyMin.x; ix < xyMax.x; ix+=1.0f) {
for (float iy = xyMin.y; iy <= xyMax.y; iy+=1.0f) {
Vector2 pos = new Vector2 (ix, iy);
gPoints [(int)pos.x, (int)pos.y].UpdateType (fillType);
}
}
}
示例15: MakeTileImageUrl
string MakeTileImageUrl(GPoint pos, int zoom, string language)
{
string key = TileXYToQuadKey(pos.X, pos.Y, zoom);
if(!DisableDynamicTileUrlFormat && !string.IsNullOrEmpty(UrlDynamicFormat))
{
return string.Format(UrlDynamicFormat, GetServerNum(pos, 4), key, language);
}
return string.Format(UrlFormat, GetServerNum(pos, 4), key, Version, language, ForceSessionIdOnTileAccess ? "&key=" + SessionId : string.Empty);
}