Riku
2025-10-21 0366feb2fe536a27435685e152c34c75af68b712
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
package com.flightfeather.uav.common.net
 
import com.flightfeather.uav.common.exception.BizException
import com.google.gson.JsonElement
import com.google.gson.JsonObject
import com.google.gson.JsonParser
import org.apache.http.util.EntityUtils
import java.net.URLEncoder
 
/**
 * 高德地图Web服务API
 * Date: 2024/07/14
 */
object AMapService {
    // 上海市静安区边界坐标点(高德地图坐标系)
    const val polyLineJingAn_GD =
        "121.425251,31.270666;121.425214,31.270701;121.425045,31.270854;121.424716,31.271299;121.424568,31.271929;121.424516,31.273701;121.424491,31.274204;121.424491,31.274628;121.424447,31.275131;121.424326,31.27603;121.424386,31.276267;121.424577,31.276716;121.424751,31.277268;121.424569,31.278156;121.424543,31.278364;121.424586,31.278557;121.424656,31.278809;121.424586,31.279499;121.424569,31.279649;121.424543,31.27986;121.424508,31.280023;121.424439,31.280233;121.424318,31.280461;121.424162,31.280769;121.424157,31.28078;121.424151,31.280793;121.423971,31.28115;121.423607,31.282075;121.423279,31.283111;121.423276,31.283123;121.423271,31.283137;121.423234,31.283256;121.422977,31.283988;121.422872,31.284054;121.422841,31.284198;121.422836,31.284259;121.422837,31.284316;121.422843,31.284369;121.422853,31.284456;121.422916,31.284852;121.423045,31.285697;121.423049,31.285724;121.423143,31.286115;121.423131,31.286326;121.423269,31.287252;121.423315,31.288167;121.423513,31.289124;121.423634,31.289408;121.423672,31.289683;121.423693,31.289885;121.42371,31.290057;121.42371,31.290099;121.423811,31.291006;121.4238,31.291057;121.423745,31.291059;121.422393,31.291114;121.421248,31.291377;121.419696,31.291068;121.419618,31.291678;121.418932,31.291689;121.418915,31.292288;121.418646,31.292256;121.418646,31.29289;121.418828,31.293039;121.418872,31.294027;121.419245,31.294164;121.419141,31.294837;121.419635,31.295002;121.419766,31.295616;121.420399,31.29572;121.420034,31.296912;121.420494,31.296933;121.42297,31.297186;121.422984,31.297186;121.422998,31.297189;121.423643,31.297255;121.426513,31.298409;121.426938,31.298531;121.426869,31.299864;121.42673,31.300687;121.426566,31.301729;121.426398,31.303136;121.426428,31.303203;121.42736,31.303244;121.42783,31.303271;121.427868,31.303273;121.428471,31.303308;121.428735,31.303346;121.429184,31.303394;121.429265,31.303403;121.429799,31.303462;121.430446,31.303548;121.431294,31.303635;121.431286,31.303695;121.431048,31.305769;121.431504,31.305817;121.431516,31.305822;121.431531,31.305821;121.432364,31.305909;121.432435,31.305914;121.432233,31.306888;121.43213,31.307382;121.431994,31.308162;121.431925,31.308555;121.431682,31.309484;121.431673,31.309578;121.431786,31.309635;121.431872,31.309728;121.431924,31.309804;121.432011,31.30996;121.432488,31.310298;121.432497,31.310515;121.432167,31.311686;121.432603,31.311839;121.432616,31.311843;121.432628,31.311847;121.432939,31.311956;121.433016,31.311972;121.433032,31.311941;121.433052,31.311979;121.43462,31.312297;121.432471,31.318665;121.433191,31.318541;121.433599,31.320867;121.433711,31.320924;121.434347,31.320912;121.435107,31.320897;121.435765,31.320884;121.436459,31.320871;121.4365,31.320692;121.436522,31.320551;121.436586,31.320219;121.43662,31.320045;121.43669,31.319671;121.436771,31.319667;121.446718,31.319813;121.447298,31.31857;121.447887,31.317103;121.450502,31.31773;121.453006,31.318544;121.454703,31.319248;121.455772,31.320018;121.455782,31.320023;121.455795,31.320034;121.457136,31.320999;121.465378,31.3214;121.465222,31.320395;121.465191,31.320102;121.468073,31.320247;121.468146,31.320241;121.468234,31.319281;121.468389,31.31745;121.468346,31.316478;121.468311,31.316035;121.468277,31.315201;121.468138,31.313354;121.467913,31.310022;121.467843,31.308761;121.467679,31.306304;121.463532,31.306003;121.463836,31.304554;121.464528,31.300877;121.464363,31.300589;121.464294,31.300376;121.464224,31.300181;121.464164,31.299856;121.464173,31.299626;121.464329,31.299093;121.464432,31.298489;121.464502,31.298157;121.464527,31.297994;121.464441,31.297701;121.464311,31.297515;121.46425,31.297359;121.46425,31.297146;121.464259,31.296836;121.464207,31.296623;121.464034,31.296467;121.463956,31.296367;121.463739,31.295745;121.463454,31.295339;121.463238,31.295091;121.463151,31.294884;121.463073,31.294615;121.462977,31.294266;121.462752,31.293668;121.462571,31.293088;121.462449,31.292745;121.462337,31.292609;121.462086,31.292503;121.461852,31.292391;121.461748,31.292311;121.461584,31.292111;121.461385,31.291656;121.461142,31.291244;121.460831,31.290782;121.460579,31.290466;121.46032,31.290234;121.460164,31.290111;121.460077,31.290004;121.460051,31.289911;121.460086,31.289779;121.460242,31.289548;121.460449,31.289317;121.460752,31.289117;121.4609,31.288984;121.460986,31.288811;121.461029,31.288428;121.461073,31.287936;121.461151,31.287679;121.461289,31.287436;121.46141,31.287236;121.461445,31.286919;121.461471,31.286237;121.461583,31.285233;121.461739,31.284894;121.461808,31.284695;121.461791,31.284408;121.461696,31.284109;121.461643,31.283729;121.461592,31.283329;121.461566,31.283041;121.461427,31.282648;121.461341,31.282394;121.461323,31.282195;121.461341,31.282025;121.461401,31.281799;121.461791,31.280839;121.461842,31.280619;121.461842,31.280446;121.461842,31.28015;121.461773,31.279727;121.461513,31.279676;121.461503,31.279648;121.461476,31.279471;121.461461,31.279298;121.461456,31.27899;121.461462,31.278926;121.461477,31.278881;121.461566,31.27879;121.461587,31.278768;121.461667,31.278689;121.461722,31.278614;121.461783,31.278507;121.461813,31.278439;121.461826,31.2784;121.461832,31.278357;121.461837,31.278277;121.461846,31.277971;121.461843,31.277732;121.461846,31.277505;121.461852,31.27745;121.461858,31.277389;121.46186,31.27737;121.461861,31.277355;121.461868,31.277313;121.461872,31.277303;121.461878,31.277286;121.461881,31.277278;121.461884,31.27727;121.461894,31.27725;121.461901,31.277236;121.461905,31.277228;121.46192,31.277197;121.462003,31.277025;121.462047,31.276934;121.462052,31.276923;121.462083,31.276876;121.46284,31.27539;121.462872,31.27535;121.46291,31.275312;121.462954,31.27528;121.462997,31.275254;121.463093,31.27521;121.463102,31.275207;121.463184,31.275174;121.463259,31.275148;121.463338,31.275119;121.46363,31.275027;121.463842,31.27496;121.464095,31.274832;121.464158,31.274787;121.464298,31.274685;121.464445,31.274547;121.464623,31.274393;121.464722,31.274299;121.464819,31.274194;121.464872,31.274134;121.464996,31.273967;121.465058,31.273866;121.465492,31.273311;121.465854,31.272846;121.466073,31.272539;121.466253,31.272317;121.466546,31.271956;121.466552,31.271947;121.466624,31.271859;121.466762,31.271688;121.466818,31.27162;121.466829,31.271604;121.466904,31.271506;121.467203,31.271108;121.467621,31.270551;121.46774,31.270393;121.467804,31.270302;121.467817,31.270283;121.467824,31.270271;121.467828,31.270265;121.467832,31.270259;121.467843,31.270243;121.468126,31.269824;121.468186,31.269737;121.46821,31.269703;121.468223,31.269684;121.468231,31.269672;121.468279,31.269603;121.468283,31.269597;121.46829,31.269588;121.468303,31.26957;121.468328,31.269536;121.468896,31.268761;121.468977,31.268662;121.469601,31.267801;121.470196,31.267127;121.470428,31.266903;121.470765,31.266599;121.471293,31.266139;121.472341,31.26512;121.472929,31.26456;121.472971,31.264521;121.473494,31.264022;121.473541,31.263977;121.473565,31.263954;121.474122,31.263455;121.475001,31.262711;121.475187,31.262575;121.475446,31.262419;121.475784,31.262218;121.475907,31.262157;121.476029,31.262064;121.476241,31.2619;121.476536,31.261667;121.476902,31.261364;121.476994,31.261287;121.477495,31.260864;121.477766,31.260636;121.478061,31.260384;121.478541,31.259955;121.478643,31.259871;121.478626,31.259827;121.478823,31.259712;121.479094,31.259474;121.479374,31.259219;121.479596,31.259015;121.47972,31.258919;121.479824,31.258838;121.479924,31.258774;121.479932,31.25877;121.480045,31.258714;121.480206,31.258651;121.480343,31.258607;121.480494,31.258569;121.480491,31.258468;121.480568,31.256514;121.480606,31.255687;121.480569,31.255581;121.480604,31.255498;121.480585,31.255244;121.480524,31.254947;121.480473,31.254743;121.480386,31.254515;121.480299,31.254317;121.480144,31.254088;121.479893,31.253741;121.479719,31.253428;121.479625,31.253389;121.479756,31.253206;121.479777,31.253184;121.479784,31.253178;121.479794,31.253168;121.479801,31.253161;121.479806,31.253155;121.479824,31.253138;121.479845,31.253114;121.47985,31.253087;121.479853,31.253067;121.479856,31.253053;121.479871,31.253009;121.479878,31.252995;121.479892,31.252964;121.479913,31.252934;121.47992,31.252925;121.479938,31.252901;121.479962,31.25287;121.479981,31.252846;121.480044,31.252773;121.480122,31.252691;121.480128,31.252684;121.480133,31.25268;121.480142,31.252672;121.480151,31.252668;121.480159,31.252666;121.480167,31.252667;121.480175,31.252669;121.480185,31.252673;121.480197,31.252678;121.480208,31.252682;121.480216,31.252684;121.480223,31.252683;121.480228,31.252683;121.480232,31.252684;121.480238,31.252688;121.480344,31.252553;121.480428,31.252457;121.480437,31.252446;121.480538,31.25233;121.480643,31.252209;121.480706,31.252137;121.480757,31.252079;121.480771,31.252064;121.480804,31.252025;121.480885,31.251935;121.480927,31.251888;121.480932,31.251883;121.480999,31.251802;121.481038,31.251749;121.481082,31.251703;121.481119,31.251672;121.481137,31.251637;121.481211,31.251538;121.48125,31.251487;121.481282,31.251444;121.481349,31.25135;121.481361,31.251325;121.481366,31.251303;121.481369,31.251278;121.481369,31.251263;121.48137,31.25125;121.481369,31.251214;121.481506,31.251032;121.481513,31.251022;121.481521,31.25101;121.481553,31.25096;121.481656,31.250798;121.481671,31.250775;121.481674,31.250767;121.481679,31.250757;121.481681,31.250742;121.481681,31.250723;121.481677,31.250715;121.481668,31.250695;121.48119,31.250514;121.480808,31.250361;121.480705,31.250321;121.480386,31.250199;121.480322,31.250175;121.480252,31.250148;121.479809,31.249983;121.479627,31.24989;121.479591,31.249873;121.479589,31.24981;121.480922,31.248387;121.481233,31.247954;121.481337,31.247723;121.48177,31.246578;121.48202,31.245841;121.482133,31.245363;121.482349,31.243485;121.482409,31.243204;121.482989,31.24192;121.481908,31.240898;121.481493,31.240543;121.481051,31.240316;121.480575,31.240168;121.480324,31.240106;121.480004,31.240083;121.479632,31.240108;121.478914,31.240294;121.477236,31.241178;121.476665,31.241425;121.476146,31.241472;121.475601,31.241491;121.474847,31.241421;121.474129,31.241226;121.473497,31.240947;121.472217,31.240104;121.47162,31.239771;121.470546,31.239326;121.470166,31.239247;121.46956,31.239214;121.469032,31.2393;121.468366,31.239475;121.466713,31.240541;121.466288,31.240751;121.465999,31.240844;121.465982,31.24085;121.465966,31.240854;121.464964,31.241177;121.463977,31.241383;121.462973,31.241401;121.46428,31.238271;121.464791,31.237236;121.465596,31.235913;121.465821,31.23551;121.465968,31.235247;121.466123,31.234911;121.466227,31.234591;121.466323,31.234315;121.466521,31.233394;121.466971,31.230888;121.46717,31.228149;121.467239,31.227422;121.467326,31.226987;121.467456,31.226589;121.46762,31.226205;121.467914,31.225713;121.467906,31.225687;121.467657,31.225632;121.467635,31.224483;121.467547,31.224093;121.46746,31.223866;121.46704,31.223818;121.46646,31.223802;121.465837,31.223817;121.464945,31.223888;121.464071,31.22396;121.463102,31.223964;121.460617,31.223935;121.456756,31.223898;121.456761,31.223869;121.45677,31.223854;121.456789,31.223799;121.456782,31.223774;121.456803,31.223756;121.456811,31.223734;121.456814,31.223723;121.456815,31.223715;121.45683,31.223524;121.456826,31.223301;121.456824,31.223194;121.45682,31.222891;121.456836,31.222496;121.456857,31.222264;121.456873,31.222123;121.456896,31.221918;121.456952,31.221735;121.457094,31.221452;121.457119,31.221402;121.45717,31.221301;121.457275,31.221161;121.457341,31.221073;121.457686,31.220194;121.457566,31.220143;121.457557,31.220139;121.457029,31.220013;121.456821,31.219963;121.456233,31.219829;121.456161,31.219812;121.456,31.219776;121.455956,31.219767;121.455921,31.219758;121.455888,31.219745;121.455846,31.219729;121.455805,31.219707;121.455736,31.219666;121.455668,31.219623;121.45559,31.219574;121.455253,31.219362;121.454984,31.219196;121.454714,31.219023;121.454411,31.218829;121.454359,31.218795;121.454297,31.218756;121.454191,31.218688;121.454106,31.218632;121.45402,31.218577;121.453703,31.218374;121.453567,31.218288;121.453552,31.218278;121.45354,31.218271;121.453411,31.218189;121.453211,31.218062;121.452976,31.217914;121.45285,31.217843;121.452719,31.217751;121.452677,31.217724;121.452536,31.217634;121.452317,31.217496;121.452178,31.217434;121.451527,31.217181;121.450977,31.216981;121.450917,31.216959;121.450859,31.216938;121.450687,31.216877;121.450351,31.216756;121.450221,31.216717;121.45011,31.216672;121.449544,31.216474;121.449444,31.216444;121.448846,31.216255;121.448194,31.216069;121.44812,31.216051;121.448037,31.216031;121.447999,31.216023;121.447429,31.21591;121.447239,31.215872;121.446967,31.215818;121.446559,31.215743;121.446149,31.215698;121.445851,31.215666;121.445452,31.215626;121.445327,31.215611;121.444982,31.215569;121.444964,31.215566;121.444832,31.215545;121.444743,31.215531;121.444688,31.215522;121.444666,31.215519;121.444545,31.215518;121.444513,31.215507;121.444506,31.215506;121.443995,31.215405;121.443944,31.215388;121.443495,31.215289;121.443455,31.215279;121.443163,31.21522;121.442761,31.215141;121.442368,31.215062;121.442119,31.215009;121.441982,31.214981;121.441969,31.214978;121.441566,31.214895;121.440744,31.214726;121.439898,31.214555;121.439823,31.214543;121.439464,31.214483;121.439351,31.214426;121.439333,31.214416;121.439327,31.214413;121.43932,31.214411;121.439314,31.214411;121.439303,31.21441;121.439294,31.214412;121.439282,31.214415;121.439275,31.214418;121.43927,31.214421;121.439261,31.214425;121.439251,31.214432;121.439238,31.214444;121.439229,31.214453;121.439182,31.214504;121.439165,31.214523;121.43912,31.214574;121.439101,31.214595;121.439041,31.214666;121.438979,31.214762;121.438956,31.2148;121.438926,31.214843;121.438759,31.215116;121.43865,31.215329;121.438359,31.215954;121.438354,31.215965;121.438326,31.216025;121.438316,31.216047;121.438276,31.216133;121.438141,31.216417;121.438078,31.216553;121.438062,31.216586;121.437999,31.21672;121.437928,31.216873;121.437769,31.217212;121.437742,31.217268;121.43763,31.217466;121.437621,31.21748;121.437526,31.217637;121.437387,31.217862;121.437315,31.217977;121.437281,31.218043;121.437116,31.218362;121.436951,31.218713;121.436888,31.218861;121.436787,31.219099;121.436749,31.219195;121.436682,31.219366;121.436634,31.219492;121.436623,31.21952;121.436593,31.219596;121.436576,31.21964;121.436553,31.219702;121.436525,31.219774;121.436502,31.219837;121.436485,31.219881;121.436446,31.219975;121.436429,31.220016;121.436394,31.220098;121.436201,31.2206;121.436171,31.220678;121.436162,31.220707;121.436119,31.220855;121.436099,31.221026;121.436078,31.221176;121.435977,31.221916;121.435939,31.222166;121.435872,31.222597;121.43587,31.222607;121.435855,31.222702;121.435836,31.22279;121.435811,31.222875;121.435706,31.223382;121.435632,31.223596;121.435612,31.223667;121.435599,31.223714;121.435587,31.223761;121.435581,31.223783;121.435577,31.223799;121.435561,31.223858;121.435501,31.224042;121.435487,31.224121;121.435485,31.224134;121.43548,31.224151;121.435475,31.224169;121.435469,31.224185;121.435454,31.224239;121.435447,31.224282;121.435435,31.224378;121.435448,31.224461;121.43543,31.224516;121.435426,31.22461;121.435451,31.22466;121.435418,31.224833;121.43541,31.225069;121.435255,31.225189;121.434979,31.225382;121.434904,31.225444;121.434647,31.225653;121.434462,31.225782;121.434302,31.225891;121.434161,31.225815;121.434082,31.225763;121.433907,31.225649;121.433858,31.225619;121.433626,31.225472;121.433276,31.225253;121.432955,31.225085;121.432778,31.224976;121.432458,31.224795;121.432312,31.224712;121.432232,31.224671;121.43221,31.22466;121.432181,31.224649;121.432122,31.224628;121.431987,31.224587;121.431819,31.224547;121.431793,31.22454;121.431703,31.224521;121.431586,31.224499;121.431467,31.224479;121.431368,31.224458;121.431359,31.224459;121.431015,31.224424;121.430636,31.224379;121.430537,31.224355;121.430461,31.224338;121.430389,31.22432;121.430301,31.224288;121.430212,31.224247;121.430148,31.22421;121.429768,31.223936;121.429733,31.223904;121.429691,31.223855;121.429654,31.223814;121.429616,31.223762;121.429557,31.223685;121.429509,31.223624;121.429444,31.223544;121.429394,31.223478;121.429288,31.223347;121.429057,31.223116;121.429031,31.22309;121.427912,31.224093;121.427712,31.224225;121.427799,31.224368;121.427842,31.224603;121.427877,31.224957;121.427886,31.225613;121.427869,31.225897;121.427515,31.229284;121.427513,31.229304;121.427548,31.229499;121.427747,31.230669;121.427912,31.231149;121.428103,31.231435;121.428424,31.231865;121.429603,31.233266;121.430505,31.234336;121.430826,31.234759;121.431006,31.235103;121.431105,31.235125;121.431336,31.235141;121.431615,31.235126;121.431792,31.235104;121.432083,31.23508;121.432147,31.235074;121.432563,31.235036;121.432828,31.235017;121.432861,31.235014;121.432909,31.235009;121.43296,31.235004;121.433011,31.234999;121.433037,31.234999;121.433085,31.234998;121.433176,31.235013;121.433355,31.235005;121.433492,31.235016;121.433641,31.235032;121.433866,31.235058;121.433873,31.235059;121.433935,31.235066;121.434238,31.235104;121.434482,31.235136;121.434588,31.235149;121.435022,31.235253;121.435165,31.235251;121.435265,31.235276;121.435353,31.2353;121.435503,31.235346;121.435529,31.235387;121.435639,31.235393;121.435685,31.23541;121.435874,31.235493;121.436038,31.235579;121.436207,31.235709;121.436352,31.235772;121.436693,31.236002;121.436769,31.236012;121.436985,31.236138;121.437176,31.236249;121.437206,31.236269;121.437215,31.236276;121.437226,31.236283;121.437222,31.236319;121.43728,31.236321;121.437392,31.236416;121.437514,31.236538;121.437664,31.236664;121.437744,31.236753;121.43778,31.236795;121.437839,31.236863;121.437895,31.236929;121.437965,31.237002;121.43798,31.237017;121.438127,31.237086;121.438174,31.237127;121.438386,31.237218;121.438447,31.237248;121.438593,31.237321;121.438614,31.237332;121.43915,31.237593;121.439519,31.237768;121.439537,31.237777;121.439702,31.237844;121.439828,31.237887;121.439985,31.237958;121.440291,31.238051;121.441225,31.238662;121.441879,31.239039;121.441939,31.239077;121.442074,31.239155;121.442284,31.239281;121.442583,31.239455;121.442616,31.23947;121.442701,31.239503;121.443,31.239636;121.443184,31.23972;121.443358,31.23981;121.443408,31.239848;121.443615,31.240007;121.443854,31.240191;121.444099,31.240321;121.444329,31.240481;121.444525,31.240604;121.444648,31.240678;121.444803,31.24077;121.445231,31.241025;121.445774,31.241349;121.445956,31.241445;121.446046,31.241481;121.446202,31.241544;121.446369,31.241612;121.446519,31.241674;121.446804,31.241794;121.447232,31.241972;121.447347,31.241987;121.447409,31.241996;121.447474,31.24201;121.447552,31.242028;121.447724,31.242074;121.447899,31.242122;121.449102,31.242444;121.44913,31.242452;121.449186,31.242471;121.449222,31.242487;121.44925,31.242499;121.449283,31.242527;121.449328,31.242573;121.449377,31.242625;121.449533,31.242787;121.449761,31.243026;121.449994,31.243295;121.448755,31.24419;121.448435,31.244523;121.448305,31.244894;121.448314,31.24522;121.448608,31.245627;121.449422,31.246394;121.44976,31.246837;121.45041,31.247747;121.450618,31.248407;121.450739,31.249199;121.450696,31.2506;121.450644,31.250767;121.451285,31.250735;121.451371,31.251449;121.451467,31.251992;121.449319,31.252923;121.449449,31.253287;121.449492,31.253565;121.449709,31.25373;121.449882,31.253838;121.449943,31.253997;121.449934,31.254205;121.449891,31.25457;121.450056,31.25513;121.450133,31.255256;121.450393,31.255579;121.451043,31.256263;121.450376,31.257229;121.449796,31.258205;121.449614,31.258407;121.448323,31.260111;121.44595,31.263248;121.442953,31.26712;121.442719,31.267381;121.44226,31.267655;121.441255,31.268019;121.438854,31.268794;121.437095,31.269439;121.434183,31.271001;121.433299,31.271443;121.432415,31.271941;121.431635,31.2726;121.431236,31.273054;121.430768,31.273682;121.429889,31.27486;121.429838,31.274927;121.429786,31.274881;121.42958,31.274707;121.429027,31.274192;121.428433,31.273638;121.428021,31.27325;121.427677,31.27293;121.4273,31.272579;121.42705,31.272332;121.426736,31.272045;121.426529,31.271855;121.426398,31.271735;121.426099,31.271466;121.425261,31.270675;121.425251,31.270666"
    // 上海市静安区边界坐标点(WGS84坐标系)
    const val polyLineJingAn =
        "121.42061,31.272495;121.420573,31.27253;121.420404,31.272683;121.420075,31.273127;121.419926,31.273757;121.419874,31.275528;121.419849,31.276031;121.419849,31.276455;121.419805,31.276957;121.419684,31.277856;121.419744,31.278093;121.419935,31.278542;121.420109,31.279094;121.419927,31.279981;121.419901,31.280189;121.419944,31.280382;121.420014,31.280634;121.419944,31.281324;121.419927,31.281474;121.419901,31.281684;121.419866,31.281847;121.419796,31.282057;121.419675,31.282285;121.419519,31.282593;121.419514,31.282604;121.419508,31.282617;121.419328,31.282973;121.418963,31.283898;121.418635,31.284933;121.418632,31.284945;121.418627,31.284959;121.41859,31.285078;121.418332,31.285809;121.418227,31.285875;121.418196,31.286019;121.418191,31.28608;121.418192,31.286137;121.418198,31.28619;121.418208,31.286277;121.418271,31.286673;121.4184,31.287518;121.418404,31.287545;121.418498,31.287936;121.418486,31.288146;121.418625,31.289072;121.41867,31.289987;121.418869,31.290944;121.41899,31.291228;121.419028,31.291503;121.419049,31.291705;121.419066,31.291876;121.419066,31.291918;121.419167,31.292825;121.419156,31.292876;121.419101,31.292878;121.417747,31.292932;121.416601,31.293194;121.415048,31.292884;121.414969,31.293493;121.414283,31.293504;121.414266,31.294103;121.413996,31.29407;121.413996,31.294704;121.414179,31.294853;121.414222,31.295841;121.414596,31.295978;121.414492,31.296651;121.414986,31.296816;121.415117,31.29743;121.415751,31.297534;121.415385,31.298726;121.415846,31.298747;121.418324,31.299002;121.418338,31.299002;121.418352,31.299005;121.418998,31.299072;121.421871,31.300228;121.422297,31.30035;121.422228,31.301683;121.422089,31.302505;121.421924,31.303547;121.421756,31.304953;121.421786,31.30502;121.422719,31.305062;121.42319,31.30509;121.423228,31.305092;121.423832,31.305127;121.424096,31.305166;121.424546,31.305214;121.424627,31.305223;121.425162,31.305283;121.42581,31.30537;121.426659,31.305458;121.426651,31.305518;121.426412,31.30759;121.426869,31.307639;121.426881,31.307644;121.426896,31.307643;121.42773,31.307732;121.427801,31.307737;121.427599,31.308711;121.427496,31.309204;121.42736,31.309984;121.42729,31.310377;121.427047,31.311305;121.427038,31.311399;121.427151,31.311456;121.427237,31.311549;121.427289,31.311625;121.427376,31.311781;121.427854,31.31212;121.427863,31.312337;121.427532,31.313507;121.427969,31.31366;121.427982,31.313664;121.427994,31.313668;121.428306,31.313778;121.428383,31.313794;121.428399,31.313763;121.428419,31.313801;121.42999,31.314121;121.427836,31.320483;121.428558,31.32036;121.428966,31.322686;121.429078,31.322743;121.429715,31.322732;121.430477,31.322718;121.431136,31.322706;121.431831,31.322694;121.431872,31.322515;121.431894,31.322375;121.431958,31.322043;121.431992,31.321869;121.432063,31.321495;121.432144,31.321491;121.442111,31.321654;121.442693,31.320413;121.443283,31.318948;121.445904,31.31958;121.448415,31.320399;121.450116,31.321106;121.451188,31.321878;121.451198,31.321883;121.451211,31.321894;121.452555,31.322862;121.460821,31.323282;121.460665,31.322277;121.460633,31.321984;121.463524,31.322137;121.463598,31.322131;121.463686,31.321172;121.463842,31.319342;121.463798,31.31837;121.463763,31.317927;121.463729,31.317093;121.46359,31.315246;121.463365,31.311915;121.463295,31.310654;121.46313,31.308198;121.458971,31.307887;121.459276,31.306439;121.45997,31.302765;121.459805,31.302477;121.459735,31.302264;121.459665,31.302069;121.459605,31.301744;121.459614,31.301514;121.459771,31.300981;121.459874,31.300378;121.459944,31.300046;121.459969,31.299883;121.459883,31.29959;121.459753,31.299404;121.459692,31.299248;121.459692,31.299035;121.459701,31.298725;121.459649,31.298512;121.459475,31.298356;121.459397,31.298255;121.459179,31.297633;121.458893,31.297227;121.458677,31.296978;121.45859,31.296771;121.458511,31.296502;121.458415,31.296153;121.45819,31.295555;121.458008,31.294974;121.457886,31.294631;121.457773,31.294495;121.457522,31.294388;121.457287,31.294276;121.457183,31.294196;121.457018,31.293995;121.456819,31.29354;121.456575,31.293128;121.456263,31.292665;121.456011,31.292349;121.455751,31.292116;121.455594,31.291993;121.455507,31.291886;121.455481,31.291793;121.455516,31.291661;121.455673,31.29143;121.45588,31.2912;121.456184,31.291001;121.456333,31.290868;121.456419,31.290695;121.456462,31.290312;121.456506,31.289821;121.456584,31.289564;121.456723,31.289322;121.456844,31.289122;121.456879,31.288805;121.456905,31.288123;121.457018,31.28712;121.457174,31.286782;121.457244,31.286583;121.457227,31.286296;121.457131,31.285997;121.457078,31.285617;121.457027,31.285217;121.457001,31.284929;121.456862,31.284536;121.456775,31.284282;121.456757,31.284083;121.456775,31.283913;121.456836,31.283687;121.457227,31.282728;121.457278,31.282509;121.457278,31.282336;121.457278,31.28204;121.457209,31.281617;121.456948,31.281565;121.456938,31.281537;121.456911,31.28136;121.456896,31.281187;121.456891,31.280879;121.456897,31.280815;121.456912,31.28077;121.457001,31.28068;121.457022,31.280658;121.457103,31.280579;121.457158,31.280504;121.457219,31.280397;121.457249,31.280329;121.457262,31.280291;121.457268,31.280248;121.457273,31.280168;121.457282,31.279862;121.457279,31.279623;121.457282,31.279396;121.457288,31.279341;121.457294,31.27928;121.457296,31.279261;121.457297,31.279246;121.457304,31.279204;121.457308,31.279194;121.457314,31.279177;121.457317,31.279169;121.45732,31.279161;121.45733,31.279141;121.457337,31.279127;121.457341,31.279119;121.457357,31.279088;121.45744,31.278917;121.457484,31.278826;121.457489,31.278815;121.45752,31.278768;121.458279,31.277284;121.458311,31.277244;121.45835,31.277206;121.458394,31.277175;121.458437,31.277149;121.458533,31.277105;121.458542,31.277102;121.458624,31.277069;121.4587,31.277043;121.458779,31.277015;121.459072,31.276923;121.459284,31.276857;121.459538,31.27673;121.459601,31.276685;121.459742,31.276583;121.459889,31.276446;121.460068,31.276292;121.460167,31.276198;121.460264,31.276094;121.460317,31.276034;121.460442,31.275867;121.460504,31.275766;121.460939,31.275213;121.461303,31.274749;121.461522,31.274443;121.461703,31.274221;121.461997,31.273861;121.462003,31.273852;121.462075,31.273764;121.462213,31.273594;121.46227,31.273526;121.462281,31.27351;121.462356,31.273412;121.462656,31.273015;121.463075,31.272459;121.463195,31.272302;121.463259,31.272211;121.463272,31.272192;121.463279,31.27218;121.463283,31.272174;121.463287,31.272168;121.463298,31.272152;121.463582,31.271734;121.463642,31.271647;121.463666,31.271613;121.463679,31.271594;121.463687,31.271582;121.463735,31.271513;121.463739,31.271507;121.463746,31.271498;121.463759,31.271481;121.463784,31.271447;121.464354,31.270673;121.464436,31.270575;121.465062,31.269716;121.465659,31.269044;121.465891,31.26882;121.466229,31.268517;121.466759,31.268059;121.467811,31.267043;121.4684,31.266485;121.468443,31.266446;121.468967,31.265949;121.469015,31.265904;121.469039,31.265881;121.469597,31.265384;121.470479,31.264642;121.470666,31.264507;121.470926,31.264352;121.471265,31.264152;121.471388,31.264091;121.471511,31.263998;121.471724,31.263835;121.47202,31.263603;121.472387,31.263301;121.472479,31.263225;121.472982,31.262803;121.473254,31.262576;121.47355,31.262325;121.474031,31.261897;121.474134,31.261814;121.474117,31.26177;121.474314,31.261655;121.474586,31.261418;121.474867,31.261164;121.47509,31.260961;121.475215,31.260865;121.475319,31.260785;121.475419,31.260721;121.475427,31.260717;121.475541,31.260661;121.475702,31.260599;121.47584,31.260555;121.475991,31.260518;121.475988,31.260417;121.476066,31.258464;121.476104,31.257637;121.476067,31.257531;121.476102,31.257448;121.476083,31.257194;121.476022,31.256897;121.47597,31.256693;121.475883,31.256465;121.475796,31.256267;121.47564,31.256038;121.475389,31.25569;121.475214,31.255377;121.47512,31.255337;121.475251,31.255155;121.475272,31.255133;121.475279,31.255127;121.475289,31.255117;121.475296,31.25511;121.475301,31.255104;121.475319,31.255087;121.47534,31.255063;121.475345,31.255036;121.475348,31.255016;121.475352,31.255002;121.475367,31.254958;121.475374,31.254944;121.475388,31.254913;121.475409,31.254883;121.475416,31.254874;121.475434,31.25485;121.475458,31.25482;121.475477,31.254796;121.47554,31.254723;121.475618,31.254641;121.475624,31.254634;121.475629,31.25463;121.475639,31.254622;121.475648,31.254618;121.475656,31.254616;121.475664,31.254617;121.475672,31.254619;121.475682,31.254623;121.475694,31.254628;121.475705,31.254632;121.475713,31.254634;121.47572,31.254633;121.475725,31.254633;121.475729,31.254634;121.475735,31.254638;121.475841,31.254504;121.475926,31.254408;121.475935,31.254397;121.476036,31.254281;121.476141,31.254161;121.476204,31.254089;121.476256,31.254031;121.47627,31.254016;121.476303,31.253977;121.476384,31.253888;121.476426,31.253841;121.476431,31.253836;121.476499,31.253755;121.476538,31.253702;121.476582,31.253656;121.476619,31.253625;121.476637,31.25359;121.476711,31.253492;121.47675,31.253441;121.476783,31.253398;121.47685,31.253304;121.476862,31.253279;121.476867,31.253257;121.47687,31.253232;121.47687,31.253217;121.476871,31.253204;121.47687,31.253168;121.477007,31.252987;121.477014,31.252977;121.477022,31.252965;121.477054,31.252915;121.477158,31.252753;121.477173,31.25273;121.477176,31.252722;121.477181,31.252712;121.477183,31.252697;121.477183,31.252678;121.477179,31.25267;121.47717,31.25265;121.47669,31.252468;121.476307,31.252314;121.476204,31.252274;121.475884,31.252151;121.475819,31.252127;121.475749,31.2521;121.475305,31.251933;121.475122,31.25184;121.475086,31.251823;121.475084,31.25176;121.476422,31.250341;121.476734,31.249909;121.476838,31.249679;121.477273,31.248536;121.477524,31.2478;121.477637,31.247322;121.477854,31.245446;121.477914,31.245165;121.478496,31.243883;121.477412,31.242858;121.476995,31.242502;121.476552,31.242274;121.476074,31.242125;121.475822,31.242062;121.475501,31.242038;121.475128,31.242062;121.474407,31.242246;121.472724,31.243125;121.472151,31.24337;121.47163,31.243416;121.471083,31.243433;121.470327,31.243361;121.469606,31.243164;121.468972,31.242884;121.467688,31.242038;121.467089,31.241703;121.466012,31.241256;121.465631,31.241176;121.465023,31.241141;121.464493,31.241226;121.463825,31.241399;121.462167,31.24246;121.461741,31.242669;121.461451,31.242761;121.461434,31.242767;121.461418,31.242771;121.460413,31.243091;121.459423,31.243295;121.458416,31.24331;121.459727,31.240185;121.460239,31.239152;121.461047,31.237831;121.461273,31.237429;121.46142,31.237167;121.461576,31.236831;121.46168,31.236512;121.461776,31.236236;121.461975,31.235316;121.462427,31.232812;121.462626,31.230075;121.462696,31.229349;121.462783,31.228914;121.462913,31.228516;121.463078,31.228133;121.463373,31.227642;121.463365,31.227616;121.463115,31.22756;121.463093,31.226412;121.463005,31.226022;121.462918,31.225795;121.462496,31.225746;121.461915,31.225728;121.46129,31.225742;121.460395,31.22581;121.459518,31.22588;121.458547,31.225882;121.456054,31.225847;121.452183,31.225801;121.452188,31.225772;121.452197,31.225757;121.452216,31.225702;121.452209,31.225677;121.45223,31.225659;121.452238,31.225637;121.452241,31.225626;121.452242,31.225618;121.452257,31.225427;121.452253,31.225204;121.452251,31.225097;121.452247,31.224794;121.452263,31.2244;121.452284,31.224168;121.4523,31.224027;121.452323,31.223822;121.452379,31.223639;121.452522,31.223357;121.452547,31.223307;121.452598,31.223206;121.452703,31.223066;121.452769,31.222978;121.453115,31.222101;121.452995,31.222049;121.452986,31.222045;121.452457,31.221918;121.452248,31.221868;121.451659,31.221732;121.451586,31.221715;121.451425,31.221679;121.451381,31.22167;121.451346,31.221661;121.451313,31.221648;121.451271,31.221632;121.451229,31.22161;121.45116,31.221568;121.451092,31.221525;121.451014,31.221476;121.450676,31.221263;121.450406,31.221097;121.450136,31.220923;121.449832,31.220729;121.44978,31.220695;121.449718,31.220656;121.449611,31.220587;121.449526,31.220531;121.44944,31.220476;121.449122,31.220273;121.448986,31.220186;121.448971,31.220176;121.448959,31.220169;121.448829,31.220087;121.448629,31.21996;121.448393,31.219811;121.448267,31.21974;121.448136,31.219648;121.448093,31.219621;121.447952,31.21953;121.447733,31.219392;121.447593,31.21933;121.446941,31.219075;121.446389,31.218874;121.446329,31.218852;121.446271,31.218831;121.446099,31.21877;121.445762,31.218648;121.445631,31.218609;121.44552,31.218564;121.444953,31.218365;121.444853,31.218335;121.444253,31.218144;121.4436,31.217957;121.443525,31.217939;121.443442,31.217919;121.443404,31.217911;121.442833,31.217797;121.442642,31.217758;121.44237,31.217704;121.441961,31.217628;121.44155,31.217582;121.441251,31.21755;121.440851,31.217509;121.440726,31.217494;121.44038,31.217451;121.440362,31.217448;121.44023,31.217427;121.440141,31.217413;121.440086,31.217404;121.440064,31.217401;121.439942,31.2174;121.43991,31.217389;121.439903,31.217388;121.439391,31.217286;121.43934,31.217269;121.43889,31.217169;121.43885,31.217159;121.438557,31.217099;121.438155,31.21702;121.437761,31.21694;121.437511,31.216886;121.437374,31.216858;121.437361,31.216855;121.436957,31.216772;121.436133,31.216601;121.435286,31.216429;121.435211,31.216417;121.434851,31.216356;121.434738,31.216299;121.43472,31.216289;121.434714,31.216286;121.434707,31.216284;121.434701,31.216284;121.43469,31.216283;121.434681,31.216285;121.434669,31.216288;121.434662,31.216291;121.434657,31.216294;121.434648,31.216298;121.434637,31.216305;121.434624,31.216317;121.434615,31.216326;121.434568,31.216377;121.434551,31.216396;121.434506,31.216447;121.434487,31.216468;121.434427,31.216538;121.434365,31.216634;121.434342,31.216672;121.434312,31.216715;121.434144,31.216988;121.434035,31.217201;121.433744,31.217825;121.433739,31.217836;121.433711,31.217896;121.433701,31.217918;121.43366,31.218004;121.433525,31.218287;121.433462,31.218423;121.433446,31.218456;121.433383,31.21859;121.433312,31.218743;121.433152,31.219081;121.433125,31.219137;121.433013,31.219335;121.433004,31.219349;121.432909,31.219506;121.43277,31.21973;121.432698,31.219845;121.432663,31.219911;121.432498,31.22023;121.432333,31.22058;121.43227,31.220728;121.432168,31.220966;121.43213,31.221062;121.432063,31.221233;121.432015,31.221358;121.432004,31.221386;121.431974,31.221462;121.431957,31.221506;121.431934,31.221568;121.431906,31.22164;121.431883,31.221703;121.431866,31.221747;121.431827,31.221841;121.43181,31.221882;121.431775,31.221964;121.431581,31.222465;121.431551,31.222543;121.431542,31.222572;121.431499,31.22272;121.431479,31.222891;121.431458,31.223041;121.431357,31.22378;121.431319,31.22403;121.431251,31.224461;121.431249,31.224471;121.431234,31.224566;121.431215,31.224654;121.43119,31.224739;121.431085,31.225245;121.431011,31.225459;121.430991,31.22553;121.430978,31.225577;121.430966,31.225624;121.43096,31.225646;121.430956,31.225662;121.43094,31.225721;121.43088,31.225905;121.430866,31.225984;121.430864,31.225997;121.430859,31.226014;121.430854,31.226032;121.430848,31.226047;121.430833,31.226101;121.430826,31.226144;121.430814,31.22624;121.430827,31.226323;121.430809,31.226378;121.430805,31.226472;121.43083,31.226522;121.430796,31.226695;121.430788,31.226931;121.430633,31.227051;121.430357,31.227243;121.430282,31.227305;121.430024,31.227514;121.429839,31.227642;121.429678,31.227751;121.429537,31.227675;121.429458,31.227623;121.429283,31.227509;121.429234,31.227479;121.429001,31.227331;121.428651,31.227112;121.428329,31.226944;121.428152,31.226834;121.427832,31.226653;121.427685,31.22657;121.427605,31.226529;121.427583,31.226518;121.427554,31.226507;121.427495,31.226486;121.42736,31.226444;121.427192,31.226404;121.427165,31.226397;121.427075,31.226378;121.426958,31.226356;121.426839,31.226336;121.42674,31.226315;121.426731,31.226316;121.426386,31.22628;121.426007,31.226235;121.425908,31.226211;121.425831,31.226194;121.425759,31.226176;121.425671,31.226143;121.425582,31.226102;121.425518,31.226065;121.425137,31.225791;121.425102,31.225759;121.42506,31.22571;121.425023,31.225669;121.424985,31.225617;121.424926,31.22554;121.424878,31.225479;121.424813,31.225399;121.424763,31.225333;121.424657,31.225202;121.424426,31.22497;121.424399,31.224944;121.423279,31.225946;121.423079,31.226077;121.423166,31.22622;121.423209,31.226455;121.423244,31.226809;121.423253,31.227465;121.423236,31.227749;121.422881,31.231134;121.422879,31.231154;121.422914,31.231349;121.423113,31.232518;121.423278,31.232998;121.423469,31.233284;121.423791,31.233715;121.424971,31.235116;121.425875,31.236187;121.426196,31.23661;121.426376,31.236954;121.426476,31.236976;121.426707,31.236993;121.426986,31.236978;121.427164,31.236956;121.427455,31.236933;121.427519,31.236927;121.427936,31.236889;121.428201,31.236871;121.428234,31.236868;121.428282,31.236863;121.428333,31.236858;121.428385,31.236853;121.428411,31.236853;121.428459,31.236852;121.42855,31.236867;121.428729,31.236859;121.428866,31.236871;121.429016,31.236887;121.429241,31.236913;121.429248,31.236914;121.42931,31.236921;121.429614,31.23696;121.429858,31.236992;121.429964,31.237005;121.430399,31.23711;121.430542,31.237108;121.430642,31.237133;121.43073,31.237157;121.430881,31.237203;121.430907,31.237244;121.431017,31.237251;121.431063,31.237268;121.431252,31.237351;121.431417,31.237437;121.431586,31.237567;121.431731,31.23763;121.432073,31.237861;121.432149,31.237871;121.432365,31.237997;121.432557,31.238108;121.432587,31.238129;121.432596,31.238136;121.432607,31.238143;121.432603,31.238179;121.432661,31.238181;121.432773,31.238276;121.432895,31.238398;121.433046,31.238524;121.433126,31.238613;121.433162,31.238655;121.433221,31.238723;121.433277,31.238789;121.433347,31.238862;121.433362,31.238877;121.433509,31.238947;121.433556,31.238988;121.433769,31.239079;121.43383,31.239109;121.433976,31.239182;121.433997,31.239193;121.434534,31.239455;121.434904,31.23963;121.434922,31.23964;121.435087,31.239707;121.435214,31.23975;121.435371,31.239821;121.435677,31.239915;121.436613,31.240527;121.437269,31.240905;121.437329,31.240943;121.437464,31.241021;121.437674,31.241147;121.437974,31.241322;121.438007,31.241337;121.438092,31.24137;121.438392,31.241504;121.438576,31.241588;121.438751,31.241678;121.438801,31.241716;121.439008,31.241876;121.439248,31.24206;121.439493,31.24219;121.439724,31.242351;121.43992,31.242474;121.440043,31.242548;121.440199,31.24264;121.440628,31.242896;121.441172,31.243221;121.441354,31.243317;121.441444,31.243353;121.441601,31.243417;121.441768,31.243485;121.441918,31.243547;121.442204,31.243668;121.442633,31.243846;121.442748,31.243862;121.442811,31.243871;121.442876,31.243885;121.442954,31.243903;121.443126,31.243949;121.443302,31.243998;121.444507,31.244322;121.444536,31.24433;121.444592,31.244349;121.444628,31.244365;121.444656,31.244377;121.444689,31.244405;121.444734,31.244451;121.444783,31.244503;121.444939,31.244666;121.445168,31.244905;121.445402,31.245174;121.444159,31.246066;121.443839,31.246399;121.443708,31.246769;121.443717,31.247095;121.444012,31.247502;121.444828,31.248271;121.445167,31.248714;121.445818,31.249625;121.446027,31.250285;121.446148,31.251077;121.446105,31.252477;121.446052,31.252644;121.446695,31.252614;121.446781,31.253327;121.446877,31.25387;121.444724,31.254797;121.444854,31.255161;121.444897,31.255439;121.445115,31.255604;121.445288,31.255712;121.445349,31.255871;121.44534,31.256079;121.445297,31.256444;121.445463,31.257004;121.44554,31.25713;121.4458,31.257454;121.446452,31.258139;121.445783,31.259103;121.445202,31.260077;121.445019,31.260279;121.443725,31.261979;121.441346,31.265111;121.438342,31.268975;121.438108,31.269236;121.437648,31.269509;121.436641,31.269871;121.434235,31.270642;121.432473,31.271284;121.429555,31.272841;121.42867,31.273281;121.427784,31.273778;121.427003,31.274436;121.426603,31.274889;121.426135,31.275516;121.425254,31.276692;121.425203,31.276759;121.425151,31.276713;121.424945,31.276539;121.424391,31.276024;121.423796,31.275469;121.423384,31.275081;121.423039,31.274761;121.422662,31.274409;121.422411,31.274162;121.422097,31.273875;121.42189,31.273685;121.421759,31.273565;121.421459,31.273296;121.42062,31.272504;121.42061,31.272495"
 
    private const val TAG = "AMapService"
    private const val KEY = "b36a93bac8950d3d7c6c06f21133de51"
 
    private val httpMethod = HttpMethod("restapi.amap.com", 443, true)
 
    data class AMapAddress(
        val country: String,
        val province: String,
        val city: String,
        val citycode: String,
        val district: String,
        val adcode: String,
        val township: String,
        val towncode: String,
        val address: String,
        // 所在道路名称
        val street:String,
        // 所在道路上的最近门牌号
        val streetNumber: String,
        // 处于该门牌号的方向
        val direction:String,
        // 处于该门牌号的方向距离
        val distance:String,
        // 所处最近交叉路口的方向
        val roadinter: String?,
        // 所处最近交叉路口的距离
        val distance2: String?,
    )
 
    data class AMapDirection(
        // 路线类型,driving: 驾车;
        val type: String,
        // 起点经纬度
        val origin: Pair<Double, Double>,
        // 终点经纬度
        val destination: Pair<Double, Double>,
        // 途径路线经纬度(不包括起点终点)
        val paths: List<Pair<Double, Double>>,
        // 方案距离,单位:米
        val distance: String
    )
 
    /**
     * 驾车路线规划
     */
    fun directionDriving(origin: Pair<Double, Double>, destination: Pair<Double, Double>): AMapDirection {
        val res = httpMethod.get(
            "/v5/direction/driving", listOf(
                "key" to KEY,
                "origin" to "${origin.first},${origin.second}",
                "destination" to "${destination.first},${destination.second}",
                "show_fields" to "polyline"
            )
        )
        val obj = handleRes(res)
        try {
            val count = obj["count"].asString.toIntOrNull()
            if (count != null && count > 0) {
                val path = obj["route"].asJsonObject["paths"].asJsonArray.get(0).asJsonObject
                val finalPaths = mutableListOf<Pair<Double, Double>>()
                path["steps"].asJsonArray.forEach {
                    finalPaths.addAll(
                        it.asJsonObject["polyline"].asString.split(";").map { str ->
                            val strArr = str.split(",")
                            strArr[0].toDouble() to strArr[1].toDouble()
                        }
                    )
                }
                return AMapDirection("driving", origin, destination, finalPaths, path["distance"].asString)
            } else {
                throw BizException("高德API驾车路线规划失败,没有找到可行的路线")
            }
        } catch (e: Exception) {
            throw BizException("高德API驾车路线规划错误,${e.message}")
        }
    }
 
    /**
     * 地理逆编码
     * @param location 坐标点
     * @return 所在街道
     */
    fun reGeo(location: Pair<Double, Double>): AMapAddress {
        val res = httpMethod.get(
            "/v3/geocode/regeo", listOf(
                "key" to KEY,
                "location" to "${location.first},${location.second}",
                "extensions" to "all"
            )
        )
        val obj = handleRes(res)
        try {
            val regeocode = obj["regeocode"].asJsonObject
            val a = regeocode["addressComponent"].asJsonObject
            val streetNumber = a["streetNumber"].asJsonObject
            val roads = regeocode["roads"].asJsonArray
            val roadinters = regeocode["roadinters"].asJsonArray
            val roadinter = if (roadinters.size() > 0) roadinters.get(0).asJsonObject else null
            return AMapAddress(
                getJsonString(a["country"]),
                getJsonString(a["province"]),
                "",
                getJsonString(a["citycode"]),
                getJsonString(a["district"]),
                getJsonString(a["adcode"]),
                getJsonString(a["township"]),
                getJsonString(a["towncode"]),
                getJsonString(regeocode["formatted_address"]),
                getJsonString(streetNumber["street"]),
                getJsonString(streetNumber["number"]),
                getJsonString(streetNumber["direction"]),
                getJsonString(streetNumber["distance"]),
                if(roadinter == null) null else getJsonString(roadinter.get("first_name")) +"和" + getJsonString(roadinter.get("second_name")) + "交叉口"
                        + getJsonString(roadinter.get("direction")),
                if(roadinter == null) null else getJsonString(roadinter["distance"])
            )
        } catch (e: Exception) {
            val regeocode = obj["regeocode"].asJsonObject
            println(regeocode)
            throw BizException("高德API坐标转换错误,${e.message}", e.cause)
        }
    }
 
    /**
     * 坐标转换
     * @param locations 原始坐标
     * @param coordsys 原坐标系,可选值:gps;mapbar;baidu;autonavi(不进行转换)
     */
    fun coordinateConvert(locations: List<Pair<Double, Double>>, coordsys: String = "gps"): List<Pair<Double, Double>> {
        val locationsStr = URLEncoder.encode(locations.joinToString("|") { "${it.first},${it.second}" }, "UTF-8")
        val res = httpMethod.get(
            "/v3/assistant/coordinate/convert", listOf(
                "key" to KEY,
                "locations" to locationsStr,
                "coordsys" to coordsys
            )
        )
        val obj = handleRes(res)
        try {
            return obj["locations"].asString.split(";").map {
                val l = it.split(",")
                l[0].toDouble() to l[1].toDouble()
            }
        } catch (e: Exception) {
            throw BizException("高德API坐标转换错误,${e.message}")
        }
    }
 
    fun searchDistrict() {
 
    }
 
    private fun handleRes(res: HttpMethod.MyResponse): JsonObject {
        if (res.success) {
            val str = EntityUtils.toString(res.m.entity)
            val json = JsonParser.parseString(str)
            return resCheck(json)
        } else {
            throw BizException("高德API网路链接错误,状态码:${res.m.statusLine.statusCode}")
        }
    }
 
    private fun resCheck(json: JsonElement): JsonObject {
        if (!json.isJsonObject) throw BizException("高德API失败,返回值不是一个object")
 
        val jo = json.asJsonObject
        if (jo["status"].asInt != 1) throw BizException("高德API失败,错误${jo["info"]}")
 
        return jo
    }
 
    private fun getJsonString(json: JsonElement): String {
        return if (json.isJsonPrimitive) json.asString else ""
    }
}