Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2498 | - | 1 | |
2 | namespace GMap.NET.MapProviders |
||
3 | { |
||
4 | using System; |
||
5 | |||
6 | /// <summary> |
||
7 | /// YandexSatelliteMap provider |
||
8 | /// </summary> |
||
9 | public class YandexSatelliteMapProvider : YandexMapProviderBase |
||
10 | { |
||
11 | public static readonly YandexSatelliteMapProvider Instance; |
||
12 | |||
13 | YandexSatelliteMapProvider() |
||
14 | { |
||
15 | } |
||
16 | |||
17 | static YandexSatelliteMapProvider() |
||
18 | { |
||
19 | Instance = new YandexSatelliteMapProvider(); |
||
20 | } |
||
21 | |||
22 | public new string Version = "3.135.0"; |
||
23 | |||
24 | #region GMapProvider Members |
||
25 | |||
26 | readonly Guid id = new Guid("2D4CE763-0F91-40B2-A511-13EF428237AD"); |
||
27 | public override Guid Id |
||
28 | { |
||
29 | get |
||
30 | { |
||
31 | return id; |
||
32 | } |
||
33 | } |
||
34 | |||
35 | readonly string name = "YandexSatelliteMap"; |
||
36 | public override string Name |
||
37 | { |
||
38 | get |
||
39 | { |
||
40 | return name; |
||
41 | } |
||
42 | } |
||
43 | |||
44 | public override PureImage GetTileImage(GPoint pos, int zoom) |
||
45 | { |
||
46 | string url = MakeTileImageUrl(pos, zoom, LanguageStr); |
||
47 | |||
48 | return GetTileImageUsingHttp(url); |
||
49 | } |
||
50 | |||
51 | #endregion |
||
52 | |||
53 | string MakeTileImageUrl(GPoint pos, int zoom, string language) |
||
54 | { |
||
55 | return string.Format(UrlFormat, UrlServer, GetServerNum(pos, 4) + 1, Version, pos.X, pos.Y, zoom, language, Server); |
||
56 | } |
||
57 | |||
58 | static readonly string UrlServer = "sat"; |
||
59 | static readonly string UrlFormat = "http://{0}0{1}.{7}/tiles?l=sat&v={2}&x={3}&y={4}&z={5}&lang={6}"; |
||
60 | } |
||
61 | } |