首先初始化地图
var point = new BMap.Point(117.225495, 39.087195)
map.centerAndZoom(point, 8); // 将point点放入map中,展示在页面中心展示,8=缩放程度
map.enableScrollWheelZoom(); // 开启滚动鼠标滑轮
##调用划分行政区域方法 [boundariesValue]由于我这个项目不是在互联网所以区域经纬度是写死的,如果你们在互联网的开发的话,就调用bdary.get这个方法就行。
var bdary = new BMap.Boundary();
let boundariesValue = ["117.151774, 38.614868;117.147246, 38.611979;117.144175, 38.608763;117.139566, 38.606021;117.135039, 38.605493;117.129417, 38.604322;117.125549, 38.602206;117.124469, 38.597568;117.118295, 38.594497;117.112976, 38.595645;117.109477, 38.598863;117.10598, 38.601379;117.092412, 38.607716;117.085325, 38.612679;117.082739, 38.613878;117.077481, 38.616838;117.07568, 38.623296;117.072592, 38.63119;117.070027, 38.639197;117.066345, 38.644746;117.062149, 38.647637;117.062296, 38.649178;117.063316, 38.658901;117.066129, 38.673928;117.070696, 38.682799;117.069998, 38.687076;117.064316, 38.689443;117.051629, 38.691883;117.051428, 38.693905;117.04676, 38.700719;117.048311, 38.712505;117.022267, 38.702478;116.999176, 38.698119;116.997875, 38.7026;116.992591, 38.701761;116.987855, 38.700919;116.982949, 38.700058;116.978404, 38.699202;116.972223, 38.698292;116.96841, 38.697463;116.964595, 38.696635;116.960411, 38.695811;116.954922, 38.694764;116.937232, 38.692612;116.934069, 38.685564;116.92708, 38.69009;116.920541, 38.692067;116.909887, 38.688355;116.902649, 38.68459;116.883858, 38.688409;116.878811, 38.700216;116.881122, 38.702172;116.879607, 38.7071;116.879154, 38.709599;116.880231, 38.718946;116.873008, 38.723125;116.876932, 38.736126;116.867586, 38.751227;116.838198, 38.747226;116.803223, 38.752632;116.801705, 38.749376;116.801065, 38.750693;116.797832, 38.746072;116.788329, 38.747068;116.782886, 38.747859;116.772738, 38.747896;116.766553, 38.74873;116.763626, 38.753882;116.75552, 38.760757;116.753109, 38.768634;116.750331, 38.781493;116.747698, 38.789533;116.742526, 38.791442;116.74463, 38.796468;116.744471, 38.803283;116.751661, 38.81618;116.753821, 38.826636;116.755548, 38.837138;116.750797, 38.841142;116.748455, 38.844373;116.75026, 38.852191;116.748429, 38.857496;116.73793, 38.85764;116.729896, 38.858596;116.729042, 38.901663;116.718231, 38.902142;116.71494, 38.903655;116.715782, 38.937208;116.7172, 38.944691;116.722988, 38.944582;116.725183, 38.949102;116.72937, 38.9635;116.730849, 38.97206;116.735113, 38.980472;116.741317, 38.983739;116.744403, 38.98715;116.751377, 38.996582;116.754576, 38.99801;116.756132, 39.000728;116.758642, 39.009503;116.761117, 39.010632;116.762533, 39.01928;116.761241, 39.019696;116.762412, 39.025716;116.765156, 39.03433;116.761931, 39.039057;116.758533, 39.041268;116.75973, 39.048095;116.765104, 39.056571;116.7785, 39.053152;116.781522, 39.056366;116.786038, 39.056763;116.788047, 39.059039;116.786521, 39.059664;116.787703, 39.061159;116.788074, 39.063547;116.792968, 39.065039;116.794354, 39.068142;116.80387, 39.066191;116.802901, 39.06236;116.799812, 39.062882;116.798384, 39.06176;116.794331, 39.06252;116.791607, 39.059731;116.7898, 39.058688;116.788936, 39.057865;116.790444, 39.05699;116.792347, 39.057209;116.790219, 39.056759;116.791088, 39.05604;116.792129, 39.053982;116.793462, 39.055899;116.794586, 39.058302;116.797167, 39.058155;116.799727, 39.058816;116.801477, 39.059579;116.803641, 39.060043;116.808858, 39.058379;116.809897, 39.056427;116.815367, 39.055762;116.818555, 39.056675;116.819496, 39.055436;116.820168, 39.056945;116.825715, 39.05634;116.825554, 39.052434;116.826564, 39.053242;116.829274, 39.053805;116.829277, 39.052733;116.833254, 39.053296;116.841083, 39.055121;116.847114, 39.055447;116.848557, 39.059054;116.848938, 39.05539;116.864635, 39.056165;116.867087, 39.058335;116.875805, 39.060348;116.876633, 39.064996;116.880214, 39.066802;116.876588, 39.075699;116.891646, 39.085448;116.909384, 39.098049;116.921283, 39.117477;116.927726, 39.116021;116.932353, 39.125037;116.932557, 39.126214;116.929337, 39.127796;116.929539, 39.132212;116.921634, 39.144795;116.920275, 39.14897;116.919986, 39.152565;116.917837, 39.155538;116.894678, 39.160818;116.872803, 39.161198;116.873184, 39.162389;116.872893, 39.169608;116.871042, 39.175615;116.869418, 39.18034;116.870471, 39.189199;116.869431, 39.198318;116.867109, 39.211064;116.877762, 39.223568;116.881339, 39.230514;116.885187, 39.235804;116.887922, 39.233372;116.89034, 39.230888;116.894175, 39.229801;116.899003, 39.232861;116.897377, 39.237262;116.891093, 39.245003;116.888306, 39.244972;116.88552, 39.246334;116.881821, 39.256633;116.882229, 39.27623;116.883416, 39.278136;116.872509, 39.297606;116.872854, 39.304247;116.885719, 39.311228;116.889038, 39.314599;116.894737, 39.322384;116.892862, 39.337754;116.896109, 39.340955;116.891685, 39.34379;116.888761, 39.345106;116.878861, 39.349883;116.87834, 39.347681;116.875461, 39.352832;116.878241, 39.354323;116.87964, 39.359018;116.881642, 39.358669;116.876667, 39.363165;116.873839, 39.362829;116.865959, 39.360232;116.86541, 39.356978;116.862521, 39.35323;116.860036, 39.350629;116.852264, 39.349032;116.850302, 39.347318;116.842372, 39.345374;116.840031, 39.345664;116.834754, 39.344104;116.834809, 39.345744;116.82957, 39.357655;116.834556, 39.363947;116.84285, 39.369736;116.836495, 39.3705;116.832172, 39.369662;116.828583, 39.37114;116.828292, 39.372353;116.825986, 39.37548;116.824675, 39.376947;116.827958, 39.379652;116.843238, 39.381875;116.84333, 39.384077;116.843844, 39.384246;116.846525, 39.384481;116.84665, 39.387274;116.845136, 39.39353;116.845636, 39.399699;116.841388, 39.402755;116.845353, 39.410379;116.846142, 39.419415;116.858029, 39.420568;116.860084, 39.424581;116.863653, 39.427024;116.867127, 39.428573;116.86816, 39.430921;116.870831, 39.436979;116.874532, 39.443703;116.870485, 39.443433;116.866695, 39.443759;116.853463, 39.447317;116.850538, 39.445545;116.841513, 39.442718;116.833069, 39.445111;116.833855, 39.445689;116.833193, 39.451177;116.830235, 39.453713;116.820924, 39.457244;116.817167, 39.454224;116.812054, 39.452619;116.804181, 39.452854;116.79976, 39.457613;116.803283, 39.457559;116.804628, 39.458293;116.800783, 39.467312;116.795807, 39.471978;116.794846, 39.473935;116.793179, 39.475063;116.795054, 39.478258;116.798863, 39.479665;116.811814, 39.482453;116.817332, 39.485481;116.822382, 39.488082;116.826684, 39.487005;116.827823, 39.492933;116.823886, 39.501356;116.817399, 39.505144;116.822791, 39.506818;116.820542, 39.516179;116.823668, 39.516019;116.824716, 39.516744;116.832296, 39.517958;116.829564, 39.532933;116.82942, 39.53836;116.828637, 39.540129;116.822805, 39.535052;116.814627, 39.535126;116.809279, 39.536404;116.802938, 39.547185;116.797443, 39.553035;116.794028, 39.560828;116.797886, 39.565921;116.803906, 39.571419;116.803751, 39.572567;116.805172, 39.575335;116.811241, 39.576791;116.815225, 39.582316;116.81821, 39.583009;116.815207, 39.586746;116.812225, 39.588605;116.810383, 39.589818;116.807681, 39.592325;116.805549, 39.595311;116.805823, 39.597445;116.805023, 39.60077;116.805979, 39.60412;116.808583, 39.602787;116.80968, 39.603771;116.814197, 39.604368;116.811729, 39.60675;116.812253, 39.608063;116.811666, 39.609656;116.806861, 39.60949;116.810846, 39.611725;116.816365, 39.614749;116.817659, 39.61202;116.815261, 39.610135;116.816971, 39.606894;116.822701, 39.611311;116.820622, 39.615191;116.819841, 39.621374;116.825386, 39.624392;116.827065, 39.624414;116.830599, 39.62255;116.83181, 39.619284;116.839251, 39.621621;116.842127, 39.624239;116.842924, 39.626517;116.845635, 39.627725;116.84003, 39.63277;116.835065, 39.637377;116.833946, 39.63885;116.834673, 39.642304;116.83484, 39.645572;116.837261, 39.645274;116.841807, 39.647541;116.841604, 39.651024;116.847462, 39.649498;116.848517, 39.651732;116.849867, 39.656021;116.856482, 39.657278;116.857807, 39.661226;116.857407, 39.668182;116.856093, 39.668491;116.856434, 39.672203;116.857399, 39.673691;116.862602, 39.673854;116.862771, 39.673288;116.866799, 39.673498;116.867161, 39.674033;116.867362, 39.674605;116.86962, 39.675197;116.870295, 39.676557;116.870591, 39.676745;116.878875, 39.677629;116.879644, 39.677536;116.883963, 39.674389;116.882107, 39.678184;116.882527, 39.678973;116.885173, 39.679661;116.885905, 39.680654;116.887616, 39.681193;116.890353, 39.681891;116.896226, 39.681734;116.899707, 39.680247;116.903508, 39.680531;116.905874, 39.678355;116.90983, 39.682584;116.913762, 39.683768;116.914555, 39.686494;116.913567, 39.692179;116.919928, 39.695898;116.919667, 39.698578;116.918755, 39.699846;116.920181, 39.70193;116.920137, 39.704485;116.926931, 39.702697;116.924281, 39.710444;116.930892, 39.713117;116.939747, 39.712974;116.941129, 39.711586;116.944623, 39.711532;116.946934, 39.712843;116.957268, 39.709208;116.955689, 39.708933;116.952961, 39.70327;116.951211, 39.701624;116.951711, 39.698745;116.952175, 39.694694;116.951804, 39.694046;116.950592, 39.693166;116.951047, 39.691885;116.952973, 39.688443;116.957146, 39.683537;116.952678, 39.682903;116.95282, 39.682074;116.952466, 39.681159;116.95305, 39.677653;116.95636, 39.675815;116.964492, 39.672616;116.962118, 39.665632;116.963278, 39.660787;116.964968, 39.655826;116.967427, 39.652068;116.969513, 39.649973;116.970925, 39.649627;116.972189, 39.650919;116.975848, 39.653541;116.977301, 39.655156;116.977943, 39.655196;116.979502, 39.65405;116.981189, 39.653074;116.981987, 39.651716;116.981479, 39.645502;116.981869, 39.643303;116.986327, 39.644305;116.99224, 39.646064;116.995669, 39.647035;116.998197, 39.645585;116.997422, 39.648369;117.010919, 39.65125;117.011235, 39.652457;117.01394, 39.654284;117.015509, 39.655504;117.018155, 39.655073;117.027005, 39.659574;117.029926, 39.659067;117.041695, 39.654283;117.046293, 39.654292;117.062578, 39.650504;117.066592, 39.650784;117.073078, 39.648928;117.077767, 39.647415;117.089999, 39.643338;117.108112, 39.634572;117.11431, 39.631879;117.115534, 39.629214;117.118924, 39.63103;117.123251, 39.627068;117.127696, 39.625658;117.127675, 39.628069;117.133849, 39.623648;117.135436, 39.62431;117.130776, 39.62706;117.131726, 39.627912;117.133119, 39.627325;117.138475, 39.6255;117.146713, 39.622893;117.149462, 39.6233;117.14798, 39.624855;117.146577, 39.625687;117.15266, 39.627378;117.155451, 39.629051;117.158808, 39.631356;117.160749, 39.631993;117.157952, 39.633826;117.160526, 39.637251;117.171589, 39.642371;117.179475, 39.643087;117.181031, 39.648937;117.181178, 39.652118;117.175434, 39.653188;117.175484, 39.656237;117.170363, 39.660179;117.169295, 39.66509;117.167313, 39.666705;117.165834, 39.67055;117.171594, 39.675381;117.17278, 39.679183;117.174268, 39.689673;117.176824, 39.695544;117.177113, 39.704484;117.176441, 39.708097;117.177279, 39.710306;117.177081, 39.714518;117.173748, 39.717952;117.171857, 39.722422;117.175117, 39.726302;117.1726, 39.723935;117.167573, 39.726857;117.165699, 39.729601;117.160133, 39.731994;117.160947, 39.738056;117.160198, 39.742599;117.166615, 39.744559;117.169111, 39.744814;117.172665, 39.743835;117.171973, 39.744825;117.169704, 39.749838;117.168487, 39.753059;117.170444, 39.756044;117.172293, 39.756354;117.175241, 39.75564;117.178852, 39.757793;117.185354, 39.757927;117.191522, 39.758463;117.202259, 39.766026;117.209941, 39.768356;117.204804, 39.778782;117.195271, 39.784297;117.188898, 39.787952;117.18635, 39.796967;117.18249, 39.803579;117.170333, 39.804604;117.163255, 39.806722;117.165836, 39.813612;117.165048, 39.825696;117.170301, 39.824338;117.177237, 39.829807;117.196969, 39.832378;117.20076, 39.831338;117.203318, 39.832073;117.200462, 39.839276;117.207036, 39.840882;117.214102, 39.841342;117.218866, 39.838794;117.227521, 39.837394;117.22854, 39.834082;117.232483, 39.837264;117.236826, 39.839319;117.244916, 39.840226;117.255984, 39.838131;117.260608, 39.839576;117.258113, 39.839205;117.256671, 39.839905;117.257986, 39.84152;117.259775, 39.843059;117.257888, 39.844853;117.259203, 39.847014;117.260136, 39.849185;117.262508, 39.849128;117.264365, 39.84988;117.26407, 39.851197;117.261757, 39.854705;117.259793, 39.856447;117.256186, 39.862006;117.255981, 39.863363;117.252791, 39.866809;117.25032, 39.867798;117.246338, 39.866999;117.243654, 39.866079;117.24247, 39.862914;117.240072, 39.862277;117.236592, 39.863621;117.235303, 39.863398;117.234231, 39.859965;117.232889, 39.859285;117.230622, 39.859936;117.222091, 39.863287;117.218133, 39.862512;117.216352, 39.863178;117.215563, 39.865928;117.206912, 39.867835;117.202478, 39.867889;117.19984, 39.867276;117.19554, 39.8694;117.191712, 39.872361;117.190226, 39.872018;117.187729, 39.86992;117.185569, 39.86997;117.184556, 39.870958;117.185885, 39.873564;117.183592, 39.876171;117.181349, 39.876012;117.180582, 39.873286;117.178088, 39.872062;117.172597, 39.872821;117.170906, 39.87432;117.176508, 39.877627;117.179276, 39.880077;117.176758, 39.882192;117.174613, 39.88358;117.174336, 39.88247;117.173, 39.879222;117.170857, 39.878196;117.168842, 39.878986;117.168187, 39.880859;117.167035, 39.882707;117.163621, 39.884107;117.158886, 39.8861;117.159389, 39.888265;117.161528, 39.893698;117.160497, 39.89684;117.153507, 39.902477;117.152789, 39.904267;117.155278, 39.908347;117.162301, 39.911191;117.163363, 39.914509;117.161519, 39.916233;117.156388, 39.916328;117.150336, 39.916707;117.14847, 39.918753;117.147171, 39.924279;117.144893, 39.925513;117.141208, 39.925899;117.140027, 39.927309;117.143382, 39.927895;117.149502, 39.928829;117.154074, 39.930671;117.152931, 39.931592;117.151328, 39.935354;117.150415, 39.938888;117.154251, 39.942106;117.157706, 39.940654;117.160089, 39.940336;117.161618, 39.942415;117.159444, 39.946264;117.156299, 39.949373;117.15319, 39.951226;117.154209, 39.953298;117.158262, 39.951584;117.169065, 39.957401;117.173051, 39.961434;117.171729, 39.967195;117.171261, 39.968874;117.167754, 39.971134;117.168152, 39.972013;117.172687, 39.969131;117.175809, 39.969791;117.179829, 39.967261;117.182382, 39.965014;117.185745, 39.970139;117.186565, 39.973974;117.185236, 39.975613;117.186108, 39.976972;117.185875, 39.983222;117.19124, 39.983755;117.194522, 39.984694;117.196112, 39.986334;117.197119, 39.98767;117.197586, 39.992325;117.199859, 39.994665;117.201079, 39.995727;117.203178, 39.998373;117.204543, 40.001554;117.203788, 40.005215;117.202295, 40.008742;117.203215, 40.01144;117.203828, 40.015244;117.202822, 40.016753;117.201755, 40.016468;117.200889, 40.019423;117.199796, 40.022411;117.200004, 40.027821;117.195985, 40.029666;117.194294, 40.03221;117.194562, 40.037728;117.193513, 40.04071;117.19308, 40.043961;117.193281, 40.047283;117.194043, 40.05145;117.194417, 40.052478;117.192455, 40.056992;117.189976, 40.059637;117.188444, 40.063497;117.189313, 40.066959;117.191531, 40.067358;117.194974, 40.067562;117.198276, 40.067986;117.198449, 40.07138;117.203056, 40.07208;117.208326, 40.070656;117.210782, 40.069579;117.213551, 40.07079;117.217383, 40.070545;117.220052, 40.071262;117.224266, 40.07072;117.228057, 40.07137;117.228387, 40.073444;117.225966, 40.076766;117.222977, 40.079;117.220703, 40.080785;117.21923, 40.083474;117.217823, 40.086797;117.2156, 40.088347;117.216671, 40.089875;117.220485, 40.095089;117.217953, 40.097499;117.218, 40.099443;117.218078, 40.10158;117.218821, 40.102758;117.222265, 40.102487;117.226228, 40.102148;117.228646, 40.101763;117.230708, 40.101179;117.230779, 40.104251;117.232867, 40.105432;117.235062, 40.106943;117.235337, 40.109349;117.23682, 40.11096;117.242048, 40.114592;117.244203, 40.116806;117.246467, 40.119092;117.249811, 40.119348;117.252661, 40.119997;117.254006, 40.121649;117.256324, 40.123246;117.259534, 40.122087;117.262447, 40.120239;117.265484, 40.118806;117.270882, 40.11792;117.278245, 40.117622;117.281496, 40.119007;117.284324, 40.119911;117.286168, 40.122324;117.287266, 40.123691;117.289771, 40.123916;117.291996, 40.126486;117.295556, 40.128513;117.300294, 40.128236;117.304734, 40.127939;117.307112, 40.129741;117.309358, 40.1314;117.311076, 40.133925;117.312684, 40.137026;117.313377, 40.139111;117.314116, 40.142117;117.317125, 40.144016;117.319236, 40.145213;117.323045, 40.144228;117.328012, 40.145373;117.338757, 40.140495;117.353537, 40.14229;117.359362, 40.148473;117.363543, 40.151422;117.356686, 40.15248;117.359607, 40.156262;117.36065, 40.159348;117.362266, 40.162093;117.364321, 40.164354;117.364725, 40.166869;117.364426, 40.169239;117.36244, 40.171621;117.359507, 40.176337;117.357561, 40.178177;117.359095, 40.179633;117.363961, 40.179371;117.369936, 40.182407;117.370106, 40.184661;117.3787, 40.185057;117.38246, 40.184595;117.388608, 40.183702;117.397256, 40.183553;117.401499, 40.185168;117.409043, 40.189681;117.414252, 40.192062;117.415386, 40.193946;117.412065, 40.194348;117.407831, 40.197674;117.402469, 40.197689;117.398181, 40.19644;117.395619, 40.194952;117.390614, 40.194993;117.386712, 40.196955;117.386592, 40.199151;117.388178, 40.202779;117.387199, 40.205814;117.39289, 40.209667;117.396291, 40.211536;117.394756, 40.21323;117.390181, 40.213094;117.387723, 40.214309;117.385893, 40.214243;117.385347, 40.220519;117.387516, 40.225218;117.392099, 40.225863;117.398803, 40.226783;117.400087, 40.228277;117.399389, 40.23154;117.395992, 40.234188;117.397924, 40.237039;117.401943, 40.239117;117.407803, 40.238407;117.414857, 40.238266;117.418875, 40.241864;117.418193, 40.247194;117.418704, 40.251709;117.425556, 40.252364;117.432232, 40.250271;117.437917, 40.252902;117.443307, 40.256923;117.453017, 40.257231;117.460698, 40.255133;117.470802, 40.251308;117.481861, 40.245114;117.489783, 40.241778;117.497098, 40.237212;117.51411, 40.232771;117.530482, 40.236991;117.55059, 40.237268;117.554073, 40.23031;117.569139, 40.229138;117.575059, 40.221251;117.570994, 40.211761;117.578157, 40.195422;117.580519, 40.196115;117.58199, 40.19254;117.581101, 40.189281;117.582855, 40.185298;117.58597, 40.184013;117.58852, 40.181003;117.591452, 40.17758;117.595317, 40.174639;117.599921, 40.176765;117.606169, 40.177928;117.611771, 40.1729;117.612945, 40.168215;117.616824, 40.166696;117.617679, 40.167914;117.62018, 40.165774;117.619323, 40.164447;117.622898, 40.164561;117.624834, 40.163359;117.626707, 40.158872;117.624466, 40.157094;117.627232, 40.153183;117.63001, 40.15222;117.631352, 40.15312;117.63251, 40.15212;117.635191, 40.153732;117.637806, 40.151874;117.637595, 40.148611;117.641128, 40.145908;117.643468, 40.142602;117.641287, 40.138995;117.656432, 40.133561;117.654869, 40.131308;117.658248, 40.131293;117.658452, 40.129198;117.656908, 40.127876;117.657328, 40.126861;117.657855, 40.123791;117.658222, 40.120162;117.658106, 40.119229;117.661154, 40.117527;117.661846, 40.11554;117.663539, 40.114663;117.661748, 40.113113;117.657847, 40.111369;117.653522, 40.10819;117.654421, 40.104325;117.651495, 40.102662;117.652771, 40.100431;117.65484, 40.098601;117.657402, 40.097027;117.659787, 40.096471;117.661776, 40.097979;117.663245, 40.098151;117.663591, 40.100614;117.667499, 40.103069;117.670855, 40.102683;117.672828, 40.106118;117.674309, 40.104737;117.675727, 40.10272;117.677645, 40.101382;117.679025, 40.097614;117.680277, 40.09478;117.682805, 40.094835;117.681412, 40.093294;117.680832, 40.091121;117.680188, 40.088241;117.682464, 40.087882;117.684187, 40.089017;117.684087, 40.09122;117.685379, 40.09254;117.686947, 40.090948;117.68971, 40.090865;117.692383, 40.088803;117.69454, 40.08995;117.695688, 40.093739;117.695504, 40.096577;117.697176, 40.100036;117.700765, 40.100004;117.703109, 40.100816;117.705057, 40.098893;117.708249, 40.098401;117.712143, 40.098879;117.713386, 40.100193;117.714647, 40.097807;117.716747, 40.089079;117.718751, 40.089455;117.717977, 40.091958;117.720756, 40.08994;117.721941, 40.088368;117.727648, 40.086246;117.735419, 40.086453;117.741074, 40.083175;117.750754, 40.084298;117.756165, 40.087447;117.76136, 40.085106;117.764153, 40.080476;117.761524, 40.079011;117.759792, 40.075916;117.762453, 40.074278;117.7737, 40.071496;117.780268, 40.065775;117.780898, 40.063262;117.780072, 40.058643;117.75815, 40.051077;117.757255, 40.052893;117.756079, 40.052961;117.754672, 40.053708;117.753519, 40.042607;117.749822, 40.036632;117.750459, 40.023976;117.75361, 40.022102;117.757619, 40.018973;117.7632, 40.021256;117.764532, 40.024209;117.766779, 40.026507;117.770917, 40.025329;117.773349, 40.02468;117.772661, 40.02701;117.775762, 40.02818;117.789645, 40.025729;117.793374, 40.0228;117.797519, 40.021488;117.797466, 40.018725;117.801581, 40.016232;117.801431, 40.013468;117.79853, 40.011191;117.800294, 40.0097;117.801602, 40.004887;117.800881, 40.002644;117.799573, 40.000137;117.797076, 39.998827;117.796265, 39.996996;117.795068, 39.995353;117.794478, 39.992552;117.792446, 39.988038;117.792631, 39.985253;117.791362, 39.982531;117.792535, 39.980621;117.791908, 39.978493;117.788727, 39.975036;117.784945, 39.974147;117.780359, 39.975328;117.776278, 39.974959;117.771765, 39.977477;117.768155, 39.976874;117.763578, 39.97116;117.760365, 39.971749;117.755517, 39.974989;117.747274, 39.979371;117.739653, 39.977397;117.734433, 39.97847;117.730679, 39.983934;117.730544, 39.986374;117.729762, 39.986309;117.72591, 39.986234;117.717691, 39.990818;117.714128, 39.991861;117.709793, 39.992061;117.70783, 39.991677;117.704606, 39.991994;117.701974, 39.993537;117.701405, 39.993557;117.701529, 39.991568;117.69567, 39.98996;117.694791, 39.988046;117.691788, 39.985144;117.689182, 39.985895;117.686776, 39.984387;117.682781, 39.981343;117.678343, 39.979813;117.67632, 39.979961;117.672897, 39.979738;117.66932, 39.980163;117.667813, 39.979059;117.666728, 39.978658;117.664597, 39.977897;117.661901, 39.977948;117.660628, 39.977848;117.658527, 39.978648;117.6564, 39.977866;117.654367, 39.978149;117.652564, 39.978037;117.651456, 39.97823;117.648125, 39.977846;117.647043, 39.979317;117.64492, 39.978019;117.643287, 39.975864;117.641345, 39.974937;117.637611, 39.975096;117.634627, 39.975741;117.63319, 39.976057;117.628282, 39.976663;117.62503, 39.978422;117.621783, 39.978675;117.619147, 39.981262;117.619039, 39.981741;117.617992, 39.982279;117.618315, 39.983641;117.619626, 39.984571;117.619937, 39.983142;117.620692, 39.983454;117.620616, 39.984586;117.622321, 39.985183;117.622597, 39.987844;117.621952, 39.988772;117.619747, 39.988236;117.615763, 39.990184;117.612005, 39.993413;117.609529, 39.994978;117.609016, 39.997006;117.607435, 39.998686;117.606086, 40.000366;117.602601, 40.000441;117.602171, 40.00112;117.601297, 40.00106;117.599877, 40.001055;117.599442, 40.001537;117.598245, 40.003346;117.594252, 40.002198;117.592909, 40.002165;117.59285, 40.00098;117.591683, 40.000776;117.589122, 40.001253;117.585994, 40.000372;117.584537, 40.00094;117.583313, 40.002832;117.581943, 40.002202;117.578399, 40.001451;117.577084, 40.000112;117.578526, 39.999136;117.573918, 39.997379;117.571707, 39.997612;117.569633, 40.000964;117.568587, 40.002314;117.566116, 40.002815;117.56079, 40.003906;117.557507, 40.003188;117.556212, 40.004344;117.553661, 40.004794;117.550659, 40.000552;117.54925, 40.001235;117.547937, 40.001075;117.544366, 40.003401;117.543954, 40.00091;117.546062, 39.994977;117.549737, 39.989723;117.551099, 39.989119;117.553025, 39.987889;117.554408, 39.983946;117.553948, 39.982328;117.546165, 39.977141;117.54498, 39.973239;117.543881, 39.9714;117.543328, 39.967547;117.541058, 39.962333;117.54027, 39.95877;117.537799, 39.957445;117.534672, 39.958613;117.525314, 39.952837;117.522122, 39.952928;117.517703, 39.947155;117.532428, 39.9356;117.529699, 39.93053;117.528449, 39.926919;117.525807, 39.92663;117.52492, 39.926292;117.52405, 39.92741;117.522159, 39.925247;117.52077, 39.927843;117.517929, 39.926636;117.510818, 39.925401;117.511588, 39.922476;117.5142, 39.923376;117.517025, 39.923183;117.520428, 39.92614;117.519834, 39.923271;117.519905, 39.918117;117.521146, 39.916291;117.518765, 39.914058;117.519343, 39.91549;117.517223, 39.914757;117.514128, 39.914886;117.512794, 39.913467;117.510856, 39.911364;117.516505, 39.902338;117.52191, 39.900683;117.524766, 39.88416;117.526667, 39.876169;117.52915, 39.873576;117.533094, 39.868977;117.534534, 39.866234;117.53536, 39.865749;117.535826, 39.86506;117.53686, 39.864705;117.537665, 39.86395;117.53995, 39.860299;117.541363, 39.858018;117.548445, 39.851663;117.549545, 39.85139;117.55243, 39.853951;117.555083, 39.851639;117.553573, 39.848879;117.55479, 39.845903;117.547744, 39.843495;117.549589, 39.837956;117.548745, 39.838109;117.546101, 39.839635;117.545224, 39.839515;117.544936, 39.840848;117.543282, 39.84034;117.541788, 39.839896;117.541649, 39.839283;117.543229, 39.837727;117.545718, 39.837407;117.546051, 39.834784;117.547117, 39.829064;117.549615, 39.828702;117.549897, 39.827211;117.551021, 39.827526;117.552754, 39.828438;117.554409, 39.829176;117.562486, 39.819162;117.566153, 39.809106;117.572494, 39.805656;117.574773, 39.805255;117.571578, 39.80314;117.568282, 39.80172;117.566438, 39.801357;117.560969, 39.801397;117.56008, 39.799285;117.559359, 39.790016;117.555514, 39.786482;117.552656, 39.782057;117.554334, 39.781493;117.558366, 39.77958;117.560895, 39.777591;117.556879, 39.768884;117.552575, 39.769338;117.549602, 39.767416;117.547862, 39.767993;117.544934, 39.765433;117.54897, 39.766547;117.550985, 39.765733;117.556447, 39.762449;117.557627, 39.763547;117.560608, 39.768083;117.562108, 39.768416;117.563931, 39.766219;117.567191, 39.761038;117.569336, 39.760601;117.57323, 39.762569;117.57778, 39.762408;117.581552, 39.759541;117.587422, 39.755967;117.595786, 39.754329;117.602858, 39.752254;117.602746, 39.750813;117.598396, 39.749691;117.597172, 39.748633;117.603102, 39.745686;117.604328, 39.743561;117.603186, 39.742207;117.601706, 39.741463;117.5981, 39.742369;117.595559, 39.744416;117.59509, 39.743913;117.595598, 39.737853;117.59434, 39.737059;117.59087, 39.737698;117.590731, 39.735358;117.59099, 39.734829;117.585508, 39.733747;117.584007, 39.732697;117.585069, 39.729872;117.588509, 39.72924;117.591704, 39.729451;117.591501, 39.727944;117.588365, 39.726571;117.586644, 39.725852;117.586796, 39.725174;117.587547, 39.725084;117.591323, 39.726334;117.595481, 39.726086;117.60054, 39.722185;117.600299, 39.720948;117.60043, 39.717462;117.606083, 39.714746;117.609096, 39.712344;117.61183, 39.711977;117.621288, 39.712141;117.624254, 39.71071;117.627236, 39.709376;117.631905, 39.710115;117.632166, 39.714436;117.628825, 39.716872;117.633926, 39.716052;117.638195, 39.708019;117.640497, 39.707219;117.64118, 39.706925;117.641072, 39.704627;117.64166, 39.703027;117.64323, 39.702907;117.648637, 39.706859;117.651442, 39.70779;117.653742, 39.705604;117.655068, 39.700297;117.650392, 39.693687;117.655761, 39.692082;117.657089, 39.688849;117.657942, 39.687916;117.663999, 39.68871;117.664799, 39.688149;117.660951, 39.684881;117.659602, 39.683791;117.660044, 39.683032;117.666554, 39.680826;117.663643, 39.675556;117.665195, 39.673967;117.669232, 39.671906;117.672227, 39.672421;117.6754, 39.672842;117.675871, 39.671543;117.672509, 39.665542;117.670105, 39.662051;117.674251, 39.65761;117.673194, 39.655006;117.672622, 39.651055;117.671711, 39.64448;117.669555, 39.64198;117.667026, 39.642649;117.662806, 39.643657;117.659754, 39.644882;117.658655, 39.641446;117.660293, 39.635553;117.658158, 39.633677;117.652387, 39.634419;117.649567, 39.635552;117.649697, 39.633598;117.652073, 39.629106;117.651919, 39.628658;117.650598, 39.628122;117.648597, 39.627621;117.648252, 39.627492;117.647943, 39.627325;117.6473, 39.625052;117.648592, 39.619699;117.647824, 39.618193;117.641338, 39.619085;117.638443, 39.619624;117.637824, 39.617256;117.632345, 39.609144;117.630028, 39.609047;117.62722, 39.612808;117.626129, 39.612585;117.627144, 39.603756;117.628046, 39.598379;117.632332, 39.600281;117.638388, 39.608329;117.643888, 39.609881;117.644708, 39.60644;117.6453, 39.600586;117.652837, 39.599635;117.657582, 39.600303;117.662608, 39.593548;117.660239, 39.587959;117.657506, 39.585598;117.659685, 39.581355;117.664422, 39.580738;117.667208, 39.581145;117.669995, 39.582066;117.675104, 39.588558;117.679831, 39.590613;117.680266, 39.591975;117.680957, 39.595587;117.687912, 39.5982;117.691409, 39.595256;117.696703, 39.588065;117.707187, 39.5873;117.701889, 39.571067;117.698256, 39.574202;117.69705, 39.575899;117.695621, 39.575729;117.69294, 39.573683;117.692476, 39.570755;117.699154, 39.568031;117.701335, 39.563858;117.710855, 39.563625;117.713246, 39.561988;117.711288, 39.561988;117.7094, 39.558697;117.715407, 39.557831;117.714634, 39.553875;117.713931, 39.549147;117.718859, 39.54017;117.725183, 39.538056;117.72973, 39.54169;117.732505, 39.541386;117.73842, 39.542118;117.743206, 39.545706;117.744607, 39.54658;117.745953, 39.548997;117.750879, 39.553685;117.743154, 39.567449;117.744605, 39.574058;117.755284, 39.580851;117.756712, 39.581583;117.760547, 39.582491;117.759319, 39.585269;117.761448, 39.585994;117.760951, 39.587375;117.755528, 39.593495;117.755267, 39.598896;117.774136, 39.604627;117.777043, 39.603768;117.777814, 39.604357;117.779796, 39.604692;117.782533, 39.604778;117.783573, 39.603885;117.788865, 39.602267;117.797991, 39.605827;117.806149, 39.607342;117.808938, 39.607536;117.817339, 39.604423;117.826714, 39.600363;117.832315, 39.597298;117.835935, 39.596494;117.84397, 39.596296;117.847837, 39.59649;117.853917, 39.59746;117.861566, 39.599955;117.867832, 39.602184;117.872414, 39.605988;117.875393, 39.604198;117.881612, 39.602754;117.894853, 39.59597;117.902976, 39.595761;117.915987, 39.594244;117.917697, 39.59318;117.920551, 39.589986;117.922772, 39.59227;117.924397, 39.588698;117.936645, 39.585189;117.937281, 39.584012;117.939768, 39.580553;117.937691, 39.574149;117.936278, 39.57407;117.933816, 39.569912;117.931761, 39.568947;117.92727, 39.562962;117.924716, 39.560383;117.922508, 39.553482;117.921333, 39.552207;117.916149, 39.544256;117.913669, 39.541902;117.91252, 39.540779;117.912907, 39.539063;117.915728, 39.533951;117.916988, 39.535609;117.916867, 39.534404;117.917162, 39.532535;117.916103, 39.531428;117.917201, 39.528246;117.919321, 39.527265;117.919622, 39.525071;117.919657, 39.524008;117.92054, 39.522829;117.91935, 39.522352;117.91692, 39.519921;117.914732, 39.517432;117.905239, 39.514803;117.899883, 39.491565;117.904617, 39.487659;117.906804, 39.482503;117.905316, 39.476852;117.897085, 39.476494;117.894805, 39.474915;117.892861, 39.472548;117.887711, 39.472599;117.884549, 39.468193;117.878253, 39.42534;117.87724, 39.416603;117.855418, 39.415223;117.866646, 39.408254;117.868578, 39.398834;117.867499, 39.390875;117.871732, 39.386409;117.857586, 39.385234;117.855566, 39.385826;117.846928, 39.384458;117.839353, 39.383845;117.826848, 39.383086;117.81901, 39.381351;117.816288, 39.380345;117.810642, 39.37727;117.809267, 39.367614;117.816909, 39.360039;117.829767, 39.362534;117.83709, 39.362813;117.843753, 39.358527;117.845251, 39.358256;117.848902, 39.360777;117.852248, 39.362852;117.855913, 39.365002;117.858034, 39.366347;117.857686, 39.36706;117.85528, 39.370009;117.857991, 39.375785;117.858306, 39.370571;117.861637, 39.371145;117.865181, 39.370789;117.867484, 39.371393;117.855055, 39.354385;117.850367, 39.348201;117.847403, 39.341617;117.854061, 39.344459;117.856675, 39.343444;117.85924, 39.340361;117.856888, 39.337928;117.861227, 39.336834;117.870277, 39.340171;117.887649, 39.33849;117.897477, 39.3401;117.901925, 39.33439;117.905297, 39.329169;117.914397, 39.325261;117.92114, 39.326034;117.934189, 39.326193;117.957398, 39.324915;117.97251, 39.322341;117.985837, 39.306938;117.995773, 39.303337;118.006504, 39.295773;118.021551, 39.292575;118.033714, 39.285787;118.050302, 39.270985;118.062908, 39.268722;118.069434, 39.255667;118.071348, 39.236278;118.072233, 39.237936;118.074974, 39.236205;118.07767, 39.234499;118.078436, 39.230513;118.078345, 39.226244;118.077441, 39.224722;118.06137, 39.216109;118.036464, 39.204433;117.890214, 39.161756;117.858568, 39.106842;117.847384, 39.019818;117.846786, 38.981252;117.902491, 38.951254;117.874068, 38.923531;117.850201, 38.864485;117.742259, 38.830045;117.605577, 38.770131;117.736611, 38.706042;117.620538, 38.667162;117.609533, 38.619983;117.596258, 38.620867;117.587135, 38.620064;117.561723, 38.620097;117.55848, 38.617397;117.559305, 38.615241;117.559619, 38.613757;117.559503, 38.612686;117.554721, 38.61243;117.551016, 38.611281;117.545923, 38.609104;117.531258, 38.611138;117.527303, 38.615558;117.52592, 38.619627;117.519365, 38.618463;117.509056, 38.624027;117.488908, 38.623693;117.486927, 38.621491;117.488538, 38.617585;117.487952, 38.616703;117.487106, 38.616422;117.486036, 38.616589;117.484846, 38.616994;117.484209, 38.616653;117.483709, 38.615786;117.482787, 38.615136;117.482271, 38.615324;117.482185, 38.616427;117.481245, 38.617366;117.479464, 38.617678;117.478301, 38.617472;117.476951, 38.616976;117.47492, 38.616633;117.473846, 38.616508;117.468896, 38.615173;117.463594, 38.613712;117.459265, 38.612505;117.455038, 38.611312;117.450542, 38.610043;117.445466, 38.608639;117.441537, 38.607573;117.438026, 38.606015;117.433673, 38.603507;117.429596, 38.601217;117.424535, 38.597602;117.421207, 38.597347;117.418353, 38.599146;117.408651, 38.593821;117.412048, 38.591574;117.416128, 38.591226;117.41328, 38.588034;117.407706, 38.583529;117.399288, 38.578718;117.388257, 38.575162;117.377519, 38.571593;117.361857, 38.587112;117.363843, 38.576167;117.360621, 38.574003;117.357897, 38.571978;117.357715, 38.569492;117.354558, 38.5677;117.3538, 38.570326;117.350505, 38.570988;117.345512, 38.570658;117.341076, 38.570347;117.338223, 38.571426;117.332887, 38.570635;117.331256, 38.569419;117.326682, 38.566349;117.32505, 38.56512;117.323539, 38.564062;117.322376, 38.563334;117.320881, 38.562849;117.319622, 38.562478;117.317674, 38.561859;117.315865, 38.561307;117.314203, 38.561752;117.31301, 38.562175;117.312688, 38.562936;117.3124, 38.564523;117.31219, 38.565376;117.311982, 38.566161;117.311877, 38.566916;117.311572, 38.568172;117.311215, 38.569924;117.309828, 38.572675;117.308127, 38.575439;117.306453, 38.577018;117.304717, 38.577123;117.302483, 38.577666;117.299103, 38.577277;117.298497, 38.567868;117.29543, 38.567341;117.292841, 38.566899;117.290208, 38.566485;117.287818, 38.566106;117.286471, 38.565886;117.2855, 38.565784;117.284091, 38.565691;117.282331, 38.565598;117.2796, 38.565404;117.279206, 38.564338;117.275941, 38.563543;117.27294, 38.562836;117.271514, 38.56556;117.270704, 38.5678;117.262907, 38.563966;117.258275, 38.565124;117.256688, 38.567576;117.256392, 38.568499;117.254729, 38.571028;117.253405, 38.573087;117.248805, 38.576124;117.246901, 38.580366;117.244634, 38.584433;117.249684, 38.585125;117.254057, 38.586228;117.260224, 38.587706;117.263984, 38.588616;117.265844, 38.589;117.268596, 38.589595;117.266654, 38.592487;117.264566, 38.592036;117.26051, 38.591116;117.256457, 38.590179;117.253785, 38.589504;117.251289, 38.58886;117.24759, 38.587885;117.24354, 38.587005;117.244992, 38.590615;117.249073, 38.593819;117.254763, 38.597965;117.259667, 38.601693;117.262962, 38.605598;117.264349, 38.60976;117.263834, 38.613666;117.262002, 38.616381;117.25863, 38.619291;117.255332, 38.622534;117.251601, 38.624564;117.246562, 38.625098;117.241023, 38.626236;117.236217, 38.627007;117.23353, 38.62996;117.231567, 38.633719;117.228449, 38.635226;117.223804, 38.636134;117.219237, 38.637604;117.214245, 38.635342;117.210621, 38.631729;117.205619, 38.628561;117.200106, 38.627061;117.194374, 38.626326;117.187606, 38.626426;117.182797, 38.624316;117.178714, 38.62114;117.174114, 38.618092;117.169219, 38.615471;117.164533, 38.615149;117.159769, 38.615183;117.153836, 38.615236"]
// bdary.get("天津", function (rs) { //获取行政区域
// map.clearOverlays(); //清除地图覆盖物
// console.log("----------",rs)
var count = boundariesValue.length; //行政区域的点有多少个
if (count === 0) {
alert('未能获取当前输入行政区域');
return;
}
var pointArray = [];
for (var i = 0; i < count; i++) {
var ply = new BMap.Polygon(boundariesValue[i],
{
strokeWeight: 2, //设置多边形边线线粗
strokeOpacity: 1, //设置多边形边线透明度0-1
StrokeStyle: "solid", //设置多边形边线样式为实线或虚线,取值 solid 或 dashed
strokeColor: "#007dff", //设置多边形边线颜色
fillColor: "#99d7ff", //设置多边形填充颜色
fillOpacity: 0.4 //设置多边形填充颜色透明度0-1 注:标红的地放你们可以去掉看一下效果,自己体验一下
}); //建立多边形覆盖物
map.addOverlay(ply); //添加覆盖物
map.setViewport(ply.getPath()); //调整视野
}
map.setViewport(pointArray); //调整视野