我们在项目中往往需要用echarts或者其他可视化工具来生成地图,一般县级以上的很容易找到,但乡镇区划资料匮乏,这就需要去依据数据或者图纸去定制。 定制的方法无非有两种,一种是通过 http://geojson.io 网站上手动绘制乡镇地图,这个需要具备一定的空间地理功底,依据图形去绘制;另一种就是通过其他软件平台绘制的图形(其他格式)转换得到。
www.geojson.io
文件如下:
{“type”:“FeatureCollection”, “features”: [ {“type”:“Feature”,“geometry”:{“type”:“Polygon”,“coordinates”:[[[104.71225200000038,31.737587000000474],[104.71238000000011,31.737643000000105],[104.71348700000021,31.7380780000002],[104.71513900000014,31.737603000000206],[104.7158780000002,31.737266000000204],[104.71596700000009,31.737244000000146],[104.71599300000031,31.737244000000146],[104.71657500000015,31.737437000000114],[104.71683500000012,31.737532000000158],[104.71683500000012,31.737561000000255],[104.71686000000028,31.737647000000266],[104.71708700000022,31.73815300000024],[104.7172500000002,31.73847900000021],[104.71727700000031,31.738524000000155],[104.71729800000026,31.73854500000016],[104.71731200000016,31.738554000000192],[104.71735000000012,31.738559000000237],[104.71739600000018,31.738559000000237],[104.71746400000012,31.738547000000153],[104.71760700000027,31.73848500000014],[104.7179230000001,31.73832500000026],[104.71796900000015,31.738293000000226],[104.71799900000019,31.73822300000012],[104.7180110000001,31.73816500000015],[104.71808100000021,31.738114000000166],[104.71816600000011,31.73805900000025],[104.7202450000002,31.737157000000252],[104.72034600000023,31.73713000000015],[104.72038100000026,31.73713000000015],[104.72040000000021,31.737158000000306],[104.7204650000001,31.73732000000024],[104.72045400000025,31.7373530000001],[104.72041900000022,31.73739000000012],[104.72037000000023,31.73743200000024],[104.7203590000002,31.737460000000226],[104.7203590000002,31.737495000000138],[104.72057500000017,31.737785000000144],[104.72077700000017,31.737994000000185],[104.72084000000024,31.738055000000088],[104.72146100000009,31.73848500000014],[104.72152000000017,31.738522000000216],[104.72156900000016,31.738536000000295],[104.72176700000017,31.738544000000218],[104.7221620000002,31.738542000000223],[104.72242100000011,31.738529000000256],[104.72275200000013,31.738439000000255],[104.72303200000022,31.738421000000187],[104.72326900000013,31.738454000000274],[104.72352700000016,31.73851200000024],[104.72391900000025,31.738625000000184],[104.72437200000041,31.738768000000277],[104.7234325710782,31.739402141824485],[104.72248078667582,31.741484170204444],[104.72123156964767,31.7426144141823],[104.72087465049691,31.743744658159983],[104.7193874873683,31.74439900993667],[104.71724597246293,31.745886173065344],[104.71795981076468,31.74838460712141],[104.71794186955367,31.749896610708618],[104.7171269994127,31.750526122026713],[104.71569932280926,31.75082355465247],[104.71540189018339,31.751596879479223],[104.71534240365833,31.752846096507312],[104.7171269994127,31.755106584462908],[104.71617521501031,31.757129126317807],[104.71522343060809,31.75855680292142],[104.71355780790395,31.760460371726026],[104.71076194122213,31.761471642653476],[104.70846909259706,31.7605955251114],[104.70632757769152,31.757169101262775],[104.70504266874855,31.754742051037056],[104.70366258136482,31.750649378106573],[104.70432883044651,31.747032597377768],[104.70566132860966,31.743986887290248],[104.70794561117526,31.74113153408325],[104.71225200000038,31.737587000000474]]]},“properties”:{“Name”:“会昌社区”}}, {“type”:“Feature”,“geometry”:{“type”:“Polygon”,“coordinates”:[[[104.72437200000041,31.738768000000277],[104.72596200000021,31.7392260000002],[104.7262370000002,31.739231000000245],[104.72699200000017,31.739286000000163],[104.72723900000017,31.73931900000025],[104.72760100000028,31.739376000000163],[104.72776200000027,31.73943400000013],[104.72780000000023,31.739462000000174],[104.7278740000001,31.739568000000247],[104.72797500000013,31.739740000000268],[104.72812400000021,31.740164000000163],[104.72851000000014,31.741585000000157],[104.72861800000021,31.7425580000002],[104.72874100000024,31.742917000000205],[104.72906600000016,31.74350200000015],[104.72908100000012,31.74352900000025],[104.72951500000016,31.744115000000193],[104.72988700000025,31.74463400000019],[104.73034900000027,31.745503000000156],[104.73131000000018,31.74733400000008],[104.73206500000015,31.749595000000113],[104.73219900000021,31.750037000000304],[104.73227100000031,31.750474000000224],[104.73128500000024,31.750773000000265],[104.73119700000024,31.7508270000003],[104.7311480000003,31.750863000000265],[104.7310920000001,31.750921000000233],[104.73105500000025,31.751007000000243],[104.73102800000015,31.751124000000175],[104.73099400000018,31.75131200000027],[104.73098700000031,31.751590000000192],[104.73093500000027,31.75189900000015],[104.7308720000002,31.752197000000137],[104.73079600000011,31.752410000000168],[104.73071500000015,31.752559000000247],[104.73016100000018,31.753503000000194],[104.72985600000015,31.753992000000153],[104.72931600000021,31.754752000000167],[104.72912100000025,31.755016000000126],[104.72884600000026,31.75531300000017],[104.72873000000021,31.7554590000002],[104.7286870000002,31.75555200000025],[104.72867500000012,31.75563000000011],[104.72853300000025,31.75727000000029],[104.7285320000002,31.757463000000087],[104.7288800000004,31.76031000000046],[104.72575254555886,31.759330127748342],[104.72295667887704,31.75921115469788],[104.72176694837412,31.759092181647645],[104.72111259659744,31.757664505044204],[104.72016081219505,31.756712720641815],[104.71843570296585,31.756058368865297],[104.7171269994127,31.755106584462908],[104.71534240365816,31.75284609650714],[104.71540189018322,31.751596879479052],[104.71569932280909,31.7508235546523],[104.71712699941253,31.750526122026542],[104.7179418695535,31.749896610708277],[104.71795981076451,31.74838460712124],[104.71724597246276,31.745886173065117],[104.71938748736812,31.7443990099365],[104.72087465049674,31.743744658159812],[104.7212315696475,31.74261441418213],[104.72248078667565,31.741484170204274],[104.72343257107804,31.739402141824314],[104.72437200000041,31.738768000000277]]]}
可以TB通过定制各区域的json区划划分
|