给视图的中间添加了一个CrossHair
Showing
3 changed files
with
3 additions
and
149 deletions
No preview for this file type
1 | package com.pashanhoo.landsurvey.layers.tianditu; | ||
2 | |||
3 | import android.util.Log; | ||
4 | |||
5 | import com.esri.core.geometry.Point; | ||
6 | |||
7 | /** | ||
8 | * Created by jiangbotao on 2018/3/22. | ||
9 | */ | ||
10 | |||
11 | public class TDTTileinfo { | ||
12 | |||
13 | private static Point originalPoint4490 = new Point(-180, 90); | ||
14 | |||
15 | private static double[] res4490 = { | ||
16 | 1.40625, | ||
17 | 0.703125, | ||
18 | 0.3515625, | ||
19 | 0.17578125, | ||
20 | 0.087890625, | ||
21 | 0.0439453125, | ||
22 | 0.02197265625, | ||
23 | 0.010986328125, | ||
24 | 0.0054931640625, | ||
25 | 0.00274658203125, | ||
26 | 0.001373291015625, | ||
27 | 0.0006866455078125, | ||
28 | 0.00034332275390625, | ||
29 | 0.000171661376953125, | ||
30 | 8.58306884765629E-05, | ||
31 | 4.29153442382814E-05, | ||
32 | 2.14576721191407E-05, | ||
33 | 1.07288360595703E-05, | ||
34 | 5.36441802978515E-06, | ||
35 | 2.68220901489258E-06, | ||
36 | 1.34110450744629E-06 | ||
37 | }; | ||
38 | private static double[] scale4490 = { | ||
39 | 400000000, | ||
40 | 295497598.5708346, | ||
41 | 147748799.285417, | ||
42 | 73874399.6427087, | ||
43 | 36937199.8213544, | ||
44 | 18468599.9106772, | ||
45 | 9234299.95533859, | ||
46 | 4617149.97766929, | ||
47 | 2308574.98883465, | ||
48 | 1154287.49441732, | ||
49 | 577143.747208662, | ||
50 | 288571.873604331, | ||
51 | 144285.936802165, | ||
52 | 72142.9684010827, | ||
53 | 36071.4842005414, | ||
54 | 18035.7421002707, | ||
55 | 9017.87105013534, | ||
56 | 4508.93552506767, | ||
57 | 2254.467762533835, | ||
58 | 1127.2338812669175, | ||
59 | 563.616940 | ||
60 | }; | ||
61 | private static int levels = 21; | ||
62 | private static int dpi = 96; | ||
63 | private static int tileWidth = 256; | ||
64 | private static int tileHeight = 256; | ||
65 | |||
66 | |||
67 | private static Point originalPoint4326 = new Point(-20037508.3427892, 20037508.3427892); | ||
68 | private static double[] scale4326={ | ||
69 | 295829355.45, | ||
70 | 147914677.73, | ||
71 | 73957338.86, | ||
72 | 36978669.43, | ||
73 | 18489334.72, | ||
74 | 9244667.36, | ||
75 | 4622333.68, | ||
76 | 2311166.84, | ||
77 | 1155583.42, | ||
78 | 577791.71, | ||
79 | 288895.85, | ||
80 | 144447.93, | ||
81 | 72223.96, | ||
82 | 36111.98, | ||
83 | 18055.99, | ||
84 | 9028, | ||
85 | 4514, | ||
86 | 2257 }; | ||
87 | private static double[] res4326={ | ||
88 | 0.70391441567318025, | ||
89 | 0.35195720784848739, | ||
90 | 0.1759786039123464, | ||
91 | 0.087989301956173202, | ||
92 | 0.043994650989983904, | ||
93 | 0.021997325494991952, | ||
94 | 0.010998662747495976, | ||
95 | 0.005499331373747988, | ||
96 | 0.002749665686873994, | ||
97 | 0.001374832843436997, | ||
98 | 0.00068741640982119352, | ||
99 | 0.00034370821680790179, | ||
100 | 0.00017185409650664589, | ||
101 | 8.5927048253322947e-005, | ||
102 | 4.2963524126661473e-005, | ||
103 | 2.1481773960635764e-005, | ||
104 | 1.0740886980317882e-005, | ||
105 | 5.3704434901589409e-006 }; | ||
106 | |||
107 | public static Point getOriginalPoint4490() { | ||
108 | return originalPoint4490; | ||
109 | } | ||
110 | |||
111 | public static double[] getRes4490() { | ||
112 | return res4490; | ||
113 | } | ||
114 | |||
115 | public static double[] getScale4490() { | ||
116 | return scale4490; | ||
117 | } | ||
118 | |||
119 | public static Point getOriginalPoint4236() { | ||
120 | return originalPoint4326; | ||
121 | } | ||
122 | |||
123 | public static double[] getRes4326() { | ||
124 | return res4326; | ||
125 | } | ||
126 | |||
127 | public static double[] getScale4326() { | ||
128 | return scale4326; | ||
129 | } | ||
130 | |||
131 | public static int getLevels() { | ||
132 | return levels; | ||
133 | } | ||
134 | |||
135 | public static int getDpi() { | ||
136 | return dpi; | ||
137 | } | ||
138 | |||
139 | public static int getTileWidth() { | ||
140 | return tileWidth; | ||
141 | } | ||
142 | |||
143 | public static int getTileHeight() { | ||
144 | return tileHeight; | ||
145 | } | ||
146 | |||
147 | } |
... | @@ -5,7 +5,8 @@ import android.os.Environment; | ... | @@ -5,7 +5,8 @@ import android.os.Environment; |
5 | import android.util.Log; | 5 | import android.util.Log; |
6 | 6 | ||
7 | import com.esri.core.geometry.Point; | 7 | import com.esri.core.geometry.Point; |
8 | import com.pashanhoo.landsurvey.layers.tianditu.TDTTileinfo; | 8 | import com.pashanhoo.landsurvey.layers.tianditu.TianDiTuLocalTiledMapServiceLayer; |
9 | import com.pashanhoo.landsurvey.layers.tianditu.TianDiTuTiledMapServiceLayer; | ||
9 | 10 | ||
10 | import java.io.File; | 11 | import java.io.File; |
11 | 12 | ||
... | @@ -22,7 +23,7 @@ public class AppInfo { | ... | @@ -22,7 +23,7 @@ public class AppInfo { |
22 | // 天安门广场 | 23 | // 天安门广场 |
23 | public static Point initPoint = new Point(118.778644, 32.05212); | 24 | public static Point initPoint = new Point(118.778644, 32.05212); |
24 | 25 | ||
25 | public static double initRes = TDTTileinfo.getRes4490()[17]; | 26 | public static double initRes = TianDiTuTiledMapServiceLayer.getRes(17); |
26 | // public static double initRes = TDTTileinfo.getRes4326()[6]; | 27 | // public static double initRes = TDTTileinfo.getRes4326()[6]; |
27 | 28 | ||
28 | 29 | ... | ... |
-
Please register or sign in to post a comment