();
15 | foreach (XmlNode node in nodes)
16 | {
17 | var tileMap=new TileMap();
18 | if (node.Attributes != null)
19 | {
20 | tileMap.Href = node.Attributes["href"].Value;
21 | tileMap.Srs = node.Attributes["srs"].Value;
22 | tileMap.Profile = node.Attributes["profile"].Value;
23 | tileMap.Title= node.Attributes["title"].Value;
24 | tileMap.Title = node.Attributes["title"].Value;
25 | if (node.Attributes["type"] != null)
26 | {
27 | tileMap.Type = node.Attributes["type"].Value;
28 | }
29 | if (node.Attributes["overwriteurls"] != null)
30 | {
31 | tileMap.OverwriteUrls = bool.Parse(node.Attributes["overwriteurls"].Value);
32 | }
33 | }
34 |
35 |
36 | tilemaps.Add(tileMap);
37 | }
38 |
39 | return tilemaps;
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/PcArcBruTile/app/lib/Transform.cs:
--------------------------------------------------------------------------------
1 | using System.Drawing;
2 |
3 | namespace BrutileArcGIS.Lib
4 | {
5 | public class Transform
6 | {
7 | float _resolution;
8 | PointF _center;
9 | float _width;
10 | float _height;
11 | BruTile.Extent _extent;
12 |
13 | public Transform(PointF center, float resolution, float width, float height)
14 | {
15 | _center = center;
16 | _resolution = resolution;
17 | _width = width;
18 | _height = height;
19 | UpdateExtent();
20 | }
21 |
22 | public float Resolution
23 | {
24 | set
25 | {
26 | _resolution = value;
27 | UpdateExtent();
28 | }
29 | get
30 | {
31 | return _resolution;
32 | }
33 | }
34 |
35 | public PointF Center
36 | {
37 | set
38 | {
39 | _center = value;
40 | UpdateExtent();
41 | }
42 | }
43 |
44 | public float Width
45 | {
46 | set
47 | {
48 | _width = value;
49 | UpdateExtent();
50 | }
51 | }
52 |
53 | public float Height
54 | {
55 | set
56 | {
57 | _height = value;
58 | UpdateExtent();
59 | }
60 | }
61 |
62 | public BruTile.Extent Extent
63 | {
64 | get { return _extent; }
65 | }
66 |
67 | public PointF WorldToMap(double x, double y)
68 | {
69 | return new PointF((float)(x - _extent.MinX) / _resolution, (float)(_extent.MaxY - y) / _resolution);
70 | }
71 |
72 | public PointF MapToWorld(double x, double y)
73 | {
74 | return new PointF((float)(_extent.MinX + x) * _resolution, (float)(_extent.MaxY - y) * _resolution);
75 | }
76 |
77 | public RectangleF WorldToMap(double x1, double y1, double x2, double y2)
78 | {
79 | var point1 = WorldToMap(x1, y1);
80 | var point2 = WorldToMap(x2, y2);
81 | return new RectangleF(point1.X, point2.Y, point2.X - point1.X, point1.Y - point2.Y);
82 | }
83 |
84 | private void UpdateExtent()
85 | {
86 | var spanX = _width * _resolution;
87 | var spanY = _height * _resolution;
88 | _extent = new BruTile.Extent(_center.X - spanX * 0.5f, _center.Y - spanY * 0.5f,
89 | _center.X + spanX * 0.5f, _center.Y + spanY * 0.5f);
90 | }
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/PcArcBruTile/app/lib/WorldFileWriter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.IO;
4 | using BruTile;
5 |
6 | namespace BrutileArcGIS.lib
7 | {
8 | public class WorldFileWriter
9 | {
10 | public static string GetWorldFile(string format)
11 | {
12 | var res = String.Empty;
13 |
14 | format = (format.Contains(@"image/") ? format.Substring(6, format.Length - 6) : format);
15 |
16 | if (format == "jpg")
17 | {
18 | res = "jgw";
19 | }
20 | if (format == "jpeg")
21 | {
22 | res = "jgw";
23 | }
24 | else if (format == "png")
25 | {
26 | res = "pgw";
27 | }
28 | else if (format == "png8")
29 | {
30 | res = "pgw";
31 | }
32 |
33 | else if (format == "tif")
34 | {
35 | res = "tfw";
36 | }
37 |
38 | return res;
39 |
40 | }
41 |
42 |
43 | public static void WriteWorldFile(string f, Extent extent, ITileSchema schema)
44 | {
45 | using (var sw = new StreamWriter(f))
46 | {
47 | var resX = (extent.MaxX - extent.MinX) / schema.GetTileWidth("0");
48 | var resY = (extent.MaxY - extent.MinY) / schema.GetTileHeight("0");
49 | sw.WriteLine(resX.ToString(CultureInfo.InvariantCulture));
50 | sw.WriteLine("0");
51 | sw.WriteLine("0");
52 | sw.WriteLine((resY * -1).ToString(CultureInfo.InvariantCulture));
53 | sw.WriteLine(extent.MinX.ToString(CultureInfo.InvariantCulture));
54 | sw.WriteLine(extent.MaxY.ToString(CultureInfo.InvariantCulture));
55 | sw.Close();
56 | }
57 | }
58 |
59 |
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/PcArcBruTile/app/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/PcArcBruTile/app/services/arcbrutile_sample_services.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/PcArcBruTile/packages/SmartThreadPool.dll.2.2.3/SmartThreadPool.dll.2.2.3.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xiaoqqchen/PcArcBruTile/53ffaf1d35242b06008f7d0a54fcd7a6af445302/PcArcBruTile/packages/SmartThreadPool.dll.2.2.3/SmartThreadPool.dll.2.2.3.nupkg
--------------------------------------------------------------------------------
/PcArcBruTile/packages/SmartThreadPool.dll.2.2.3/lib/SmartThreadPool.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xiaoqqchen/PcArcBruTile/53ffaf1d35242b06008f7d0a54fcd7a6af445302/PcArcBruTile/packages/SmartThreadPool.dll.2.2.3/lib/SmartThreadPool.dll
--------------------------------------------------------------------------------
/PcArcBruTile/packages/log4net.1.2.10/lib/1.0/log4net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xiaoqqchen/PcArcBruTile/53ffaf1d35242b06008f7d0a54fcd7a6af445302/PcArcBruTile/packages/log4net.1.2.10/lib/1.0/log4net.dll
--------------------------------------------------------------------------------
/PcArcBruTile/packages/log4net.1.2.10/lib/1.1/log4net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xiaoqqchen/PcArcBruTile/53ffaf1d35242b06008f7d0a54fcd7a6af445302/PcArcBruTile/packages/log4net.1.2.10/lib/1.1/log4net.dll
--------------------------------------------------------------------------------
/PcArcBruTile/packages/log4net.1.2.10/lib/2.0/log4net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xiaoqqchen/PcArcBruTile/53ffaf1d35242b06008f7d0a54fcd7a6af445302/PcArcBruTile/packages/log4net.1.2.10/lib/2.0/log4net.dll
--------------------------------------------------------------------------------
/PcArcBruTile/packages/log4net.1.2.10/log4net.1.2.10.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xiaoqqchen/PcArcBruTile/53ffaf1d35242b06008f7d0a54fcd7a6af445302/PcArcBruTile/packages/log4net.1.2.10/log4net.1.2.10.nupkg
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # PcArcBruTile 0.4.1
2 |
3 | # 注意!:此项目停止维护,如有需要请移至ArcBruTile官网
4 | 在ArcGIS中快速加载中国的网络地图(暂时不支持10.3的版本,10.3.1可以使用)
5 | 经过多天的测试,终于推出了PcArcBruTile 0.4.1版本,赶紧卸载原来的插件,安装新的吧!([336的小伙伴看这里~](#336特别版)) Thanks @hyx @tm
6 |
7 | 1. 修复谷歌地图加载Bug(谷歌服务时好时坏,遇到不能加载的情况就忍忍吧~)
8 | 2. 采用多线程和内存缓存较大地优化了地图的加载
9 |
10 | 本程序只是在[ArcBruTile](https://arcbrutile.codeplex.com/)上做了稍微修改,使其能够加载中国的网络地图。我们不生成代码,我们只是代码的搬运工...
11 | 安装包地址:https://github.com/xiaoqqchen/PcArcBruTile/blob/master/Soft/ArcBruTileSetup.msi?raw=true
12 | 具体使用方法参考[我的博客](http://www.cnblogs.com/pengchen/p/4771288.html)
13 |
14 | ##使用步骤
15 | 1.下载安装包,双击直接安装,安装成功后显示“Registration succeeded”表示注册成功。
16 |
17 |
18 |
19 | 2.打开ArcMap,右键,勾选ChinaMap工具条
20 |
21 |
22 |
23 | 3.在ArcMap中显示工具条,点击菜单就可以在ArcMap中显示网络地图了。
24 |
25 |
26 |
27 | 4.OSM 和 谷歌地图最好使用VPN加速。
28 | ##示例图片
29 | 
30 |
31 | ##336特别版
32 | 作为336的一员,肯定要为实验室单独开发一个版本。[下载地址](https://github.com/xiaoqqchen/PcArcBruTile/raw/master/Soft/ArcBruTileSetup_336.msi)
33 |
34 | 特别之处是我利用了实验室的面包机来共享和缓存切片...
35 | ######把homes这个文件夹设置为y盘,其他都一样。
36 | 
37 |
38 |
39 |
--------------------------------------------------------------------------------
/README2.md:
--------------------------------------------------------------------------------
1 | # PcArcBruTile
2 | 在ArcGIS中快速加载网络地图
3 |
4 | 此项目停止维护,如有需要请移至[ArcBruTile官网](https://arcbrutile.codeplex.com/)
5 |
--------------------------------------------------------------------------------
/Soft/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xiaoqqchen/PcArcBruTile/53ffaf1d35242b06008f7d0a54fcd7a6af445302/Soft/1.png
--------------------------------------------------------------------------------
/Soft/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xiaoqqchen/PcArcBruTile/53ffaf1d35242b06008f7d0a54fcd7a6af445302/Soft/2.png
--------------------------------------------------------------------------------
/Soft/ArcBruTileSetup.msi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xiaoqqchen/PcArcBruTile/53ffaf1d35242b06008f7d0a54fcd7a6af445302/Soft/ArcBruTileSetup.msi
--------------------------------------------------------------------------------
/Soft/ArcBruTileSetup_336.msi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xiaoqqchen/PcArcBruTile/53ffaf1d35242b06008f7d0a54fcd7a6af445302/Soft/ArcBruTileSetup_336.msi
--------------------------------------------------------------------------------
/Soft/setup.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xiaoqqchen/PcArcBruTile/53ffaf1d35242b06008f7d0a54fcd7a6af445302/Soft/setup.exe
--------------------------------------------------------------------------------
/Soft/截图.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xiaoqqchen/PcArcBruTile/53ffaf1d35242b06008f7d0a54fcd7a6af445302/Soft/截图.jpg
--------------------------------------------------------------------------------