上个星期有个同事跟我要了一个读取经纬度, 描点划线的小demo
目录结构
index.html ⬇️
测试123
data.js ⬇️
let roadList = [
[34.08007205, 113.8782261],
[34.08007205, 113.8782261],
[34.08004032, 113.8782739],
[34.08004032, 113.8782739],
[34.08009244, 113.8782898],
[34.08015619, 113.8782421],
[34.08020812, 113.8782263],
[34.08022413, 113.8782263],
[34.08024014, 113.8782263],
[34.08030398, 113.8781945],
[34.08045552, 113.8781071],
[34.08069105, 113.8780118],
[34.08092242, 113.8778926],
[34.08113802, 113.8778132],
[34.0812858, 113.8777656],
[34.08136963, 113.8777338],
[34.08148923, 113.8776623],
[34.08146832, 113.8775269],
[34.08145189, 113.8774632],
[34.08133347, 113.8771207],
[34.08119401, 113.8766509],
[34.08114486, 113.8764996],
[34.08109587, 113.8763722],
[34.08109526, 113.8762926],
[34.08116287, 113.876237],
[34.081374, 113.8761099],
[34.08175632, 113.8758715],
[34.0821384, 113.8756093],
[34.08258467, 113.8753711],
[34.0830351, 113.8751568],
[34.08344954, 113.8749504],
[34.08384794, 113.8747439],
[34.0842664, 113.8745455],
[34.08469676, 113.8743392],
[34.08512679, 113.874101],
[34.08555701, 113.8738867],
[34.08599135, 113.8736883],
[34.0864055, 113.8734741],
[34.08685147, 113.8732439],
[34.08728556, 113.8730297],
[34.08771578, 113.8728314],
[34.08813396, 113.872633],
[34.08852785, 113.8724108],
[34.08896199, 113.8722125],
[34.08939201, 113.8720063],
[34.08982183, 113.8717842],
[34.09027162, 113.871562],
[34.09070138, 113.8713399],
[34.09108316, 113.8711257],
[34.09144491, 113.8709115],
[34.09183082, 113.8707132],
[34.09216068, 113.8705149],
[34.09242313, 113.8703721],
[34.09260591, 113.870261],
[34.09268948, 113.8702214],
[34.09277267, 113.8701499],
[34.09300346, 113.8700389],
[34.09327026, 113.869928],
[34.09356956, 113.8698567],
[34.0938875, 113.8696743],
[34.09424895, 113.8694522],
[34.09457876, 113.8692618],
[34.09489263, 113.8690794],
[34.09519337, 113.8688096],
[34.09552239, 113.8685636],
[34.09593162, 113.8683336],
[34.09640044, 113.8680719],
[34.09684531, 113.8678182],
[34.09727404, 113.8675565],
[34.09768693, 113.8673106],
[34.09810402, 113.8670807],
[34.09851696, 113.8668428],
[34.09889409, 113.8666208],
[34.0992634, 113.8664146],
[34.09962458, 113.8662005],
[34.09993816, 113.8660182],
[34.10023583, 113.8658437],
[34.10059661, 113.8656058],
[34.10089848, 113.8654473],
[34.10096503, 113.8653441],
[34.10099555, 113.8652409],
[34.10099371, 113.8651139],
[34.10095974, 113.8649789],
[34.10080314, 113.8646691],
[34.10059636, 113.8642164],
[34.10038987, 113.8637876],
[34.10016707, 113.8633428],
[34.09989011, 113.8627632],
[34.09966717, 113.8623185],
[34.0995297, 113.8619692],
[34.09935593, 113.861604],
[34.09923366, 113.861207],
[34.09916126, 113.8609292],
[34.09914362, 113.860826],
[34.09909296, 113.8606593],
[34.09905255, 113.8603816],
[34.09903099, 113.8600324],
[34.09902732, 113.8598023],
[34.09902415, 113.8596039],
[34.09900611, 113.8594769],
[34.09898781, 113.8593341],
[34.09898781, 113.8593341],
[34.09895319, 113.8594213],
[34.09892308, 113.8595403],
[34.09892359, 113.8595721],
[34.0989086, 113.8596355],
[34.09887423, 113.8597387],
[34.09879361, 113.8599528],
[34.0986652, 113.8601828],
[34.09851889, 113.8602938],
[34.09818962, 113.860476],
[34.09767413, 113.8607771],
[34.09713098, 113.861102],
[34.09661919, 113.8613872],
[34.09613928, 113.8616645],
[34.09570676, 113.8619022],
[34.09527811, 113.8621319],
[34.09489721, 113.8623458],
[34.09452031, 113.8625597],
[34.09410713, 113.8627577],
[34.09363694, 113.8628922],
[34.09319076, 113.8630267],
[34.09280715, 113.863066],
[34.09249159, 113.8631053],
[34.0923429, 113.8630655],
[34.09225789, 113.8630019],
[34.09215141, 113.862843],
[34.09212109, 113.8626922],
[34.09211461, 113.8622715],
[34.09212039, 113.8616128],
[34.09212106, 113.8608906],
[34.092098, 113.8601923],
[34.09208889, 113.8596209],
[34.0920819, 113.8591845],
[34.09202401, 113.8588194],
[34.09192076, 113.858621],
[34.091936, 113.8585734],
[34.09200289, 113.858502],
[34.0921187, 113.8584863],
[34.09243538, 113.8585184],
[34.09266725, 113.8585027],
[34.09290236, 113.8584395],
[34.09300279, 113.8584634],
[34.09298432, 113.8585586],
[34.09295656, 113.8585744],
[34.09295656, 113.8585744],
[34.0928525, 113.8585743],
[34.09268867, 113.85859],
[34.09252109, 113.8586216],
[34.09237339, 113.8586452],
[34.0922053, 113.8586451],
[34.09197279, 113.858621],
[34.09166786, 113.8585731],
[34.09133452, 113.8585013],
[34.09100055, 113.8583899],
[34.09064993, 113.8582388],
[34.09033055, 113.8580401],
[34.08999039, 113.8577937],
[34.08968561, 113.8575078],
[34.0893634, 113.8571345],
[34.08905643, 113.8567137],
[34.08882886, 113.8562532],
[34.0886581, 113.8558405],
[34.08856815, 113.8554754],
[34.08849461, 113.8551342],
[34.08845774, 113.8548326],
[34.0884365, 113.8545073],
[34.08842937, 113.854063],
[34.08840665, 113.8536425],
[34.08844912, 113.8532934],
[34.08846022, 113.852984],
[34.08837278, 113.8527697],
[34.08829161, 113.8526982],
[34.0881908, 113.8526504],
[34.08787113, 113.8526818],
[34.08728768, 113.8527367],
[34.08662781, 113.8527677],
[34.08610852, 113.8528306],
[34.08580861, 113.8528462],
[34.08575658, 113.8528461],
[34.08575658, 113.8528461],
[34.08575658, 113.8528461],
[34.08564076, 113.8528619],
[34.08550894, 113.8528776],
[34.08539388, 113.8529409],
[34.08531147, 113.853044],
[34.08526208, 113.8532106],
]