-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GMap.NET.Core: merge new Czech map, thanks aconcagua21
- Loading branch information
Showing
14 changed files
with
168 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
GMap.NET.Core/GMap.NET.MapProviders/Czech/CzechGeographicMapProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
namespace GMap.NET.MapProviders | ||
{ | ||
using System; | ||
|
||
/// <summary> | ||
/// CzechTuristMap provider, http://www.mapy.cz/ | ||
/// </summary> | ||
public class CzechGeographicMapProvider : CzechMapProviderBase | ||
{ | ||
public static readonly CzechGeographicMapProvider Instance; | ||
|
||
CzechGeographicMapProvider() | ||
{ | ||
} | ||
|
||
static CzechGeographicMapProvider() | ||
{ | ||
Instance = new CzechGeographicMapProvider(); | ||
} | ||
|
||
#region GMapProvider Members | ||
|
||
readonly Guid id = new Guid("50EC9FCC-E4D7-4F53-8700-2D1DB73A1D48"); | ||
public override Guid Id | ||
{ | ||
get | ||
{ | ||
return id; | ||
} | ||
} | ||
|
||
readonly string name = "CzechGeographicMap"; | ||
public override string Name | ||
{ | ||
get | ||
{ | ||
return name; | ||
} | ||
} | ||
|
||
public override PureImage GetTileImage(GPoint pos, int zoom) | ||
{ | ||
string url = MakeTileImageUrl(pos, zoom, LanguageStr); | ||
|
||
return GetTileImageUsingHttp(url); | ||
} | ||
|
||
#endregion | ||
|
||
string MakeTileImageUrl(GPoint pos, int zoom, string language) | ||
{ | ||
// http://m3.mapserver.mapy.czzemepis-m/14-8802-5528 | ||
|
||
return string.Format(UrlFormat, GetServerNum(pos, 3) + 1, zoom, pos.X, pos.Y); | ||
} | ||
|
||
static readonly string UrlFormat = "http://m{0}.mapserver.mapy.cz/zemepis-m/{1}-{2}-{3}"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
GMap.NET.Core/GMap.NET.MapProviders/Czech/CzechTuristWinterMapProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
| ||
namespace GMap.NET.MapProviders | ||
{ | ||
using System; | ||
|
||
/// <summary> | ||
/// CzechTuristMap provider, http://www.mapy.cz/ | ||
/// </summary> | ||
public class CzechTuristWinterMapProvider : CzechMapProviderBase | ||
{ | ||
public static readonly CzechTuristWinterMapProvider Instance; | ||
|
||
CzechTuristWinterMapProvider() | ||
{ | ||
} | ||
|
||
static CzechTuristWinterMapProvider() | ||
{ | ||
Instance = new CzechTuristWinterMapProvider(); | ||
} | ||
|
||
#region GMapProvider Members | ||
|
||
readonly Guid id = new Guid("F7B7FC9E-BDC2-4A9D-A1D3-A6BEC8FE0EB2"); | ||
public override Guid Id | ||
{ | ||
get | ||
{ | ||
return id; | ||
} | ||
} | ||
|
||
readonly string name = "CzechTuristWinterMap"; | ||
public override string Name | ||
{ | ||
get | ||
{ | ||
return name; | ||
} | ||
} | ||
|
||
public override PureImage GetTileImage(GPoint pos, int zoom) | ||
{ | ||
string url = MakeTileImageUrl(pos, zoom, LanguageStr); | ||
|
||
return GetTileImageUsingHttp(url); | ||
} | ||
|
||
#endregion | ||
|
||
string MakeTileImageUrl(GPoint pos, int zoom, string language) | ||
{ | ||
// http://m3.mapserver.mapy.cz/wturist_winter-m/14-8802-5528 | ||
|
||
return string.Format(UrlFormat, GetServerNum(pos, 3) + 1, zoom, pos.X, pos.Y); | ||
} | ||
|
||
static readonly string UrlFormat = "http://m{0}.mapserver.mapy.cz/wturist_winter-m/{1}-{2}-{3}"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters