apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.57k stars 19.61k forks source link

海南地图json加载后很小,其他省份显示正常。 #3308

Closed tianr1190 closed 8 years ago

tianr1190 commented 8 years ago

问题简述 (One-line summary)

海南地图通过json加载后,显示出来的地图很小。同样的option其他省份加载json后显示出来的大小正常。

版本及环境 (Version & Environment)

1. 2.

期望结果 (Expected behaviour)

期望海南也跟其他省份一样正常的显示大小。

可能哪里有问题 (What went wrong)

ECharts配置项 (ECharts option)

option = {

}

其他信息 (Other comments)

海南: image

广东省: image

pissang commented 8 years ago

因为海南岛的右下角还有个小岛 “三沙市”,可以在 geoJson 中去掉,或者 registerMap 的第二个参数设置这个区域的包围盒更靠近海南岛,参考 http://echarts.baidu.com/gallery/editor.html?c=map-usa

tianr1190 commented 8 years ago

不能够啊, 容器还有那么多空白的地方。把海南省包括三沙市布满整个容器,应该是足够大的了。 有没有可以设置缩放级别的参数呢? 查了一下没找到可以设置缩放比例的参数。

tianr1190 commented 8 years ago

实际上我给的容器是这么大:1140px, 800px image 可以看出来海南省包括三沙市只占用了一点点的位置。空白的地方还有很多。 而其他省份显示是这样: image 能够足够大的布满容器的大部分区域。

tianr1190 commented 8 years ago

知道了, 在海南底下还有很多看不见得小点点,那些小岛都属于三沙市。这些占到大部分的面积。

tianr1190 commented 8 years ago

我想改一下这个三沙市的地图,只留文字旁边的几个小岛,这样不显示完整的三沙市而只显示文字旁边的几个小岛。这样就能完整的显示整个海南的城市。 可是在geoJson里面看了半天,没看懂。。。。。不知道各个成员的含义用途

tianr1190 commented 8 years ago

请教一下,如果想保留三沙市文字旁边的几个小岛,下面的其他小岛都删除掉,应该怎么改下面段呢?

{"id":"460300","geometry":{"type":"MultiPolygon","coordinates":[["@@KCOLAJBJDDVFRHJB\JfVXFZBRATGPMHS@KGKOKqO[QUGQCOAGFCZDFLA\ALHHNLHNFT@JDBJELYAiQaEQESQ","@@HCFCFEBGEKMAMLCHAH","@@KDEFShGJSNGJGJIFCF@HBHDDDBXE^QbcR]DICMCGIC","@@k^AXNV\AŽcFOGWMMO@UDKH","@@HBJCBGEAKB","@@@DD@BA@AC@","@@DBB@BCAAC@","@@AAOHCLAVHPNHZJœ|XLRKDKOYm]YEUIWQ","@@CdNbRNZINOFYIYYOSB","@@AZN^RHXKH[@WOG]B","@@HTHJjZLBNBTFNBRBNFXIKHGHOAMKOOGKIKCeAsGSCMBOHGHMH","@@hNpJxHfFVF\\BL@PKHYCSOG¯F_GYI[QmOU@cFGF@RNPbP","@@yHEHAXDNLTTNPDLBªVfL–NRARED@FQFSCQ[_MIOG[G“I","@@BEAsKISASfIDTVRTC","@@@SEagBKjTZfE","@@EAUAWDIR@TNNbX\PVDROCWGW","@@RaOaa@YTRbbP","@@FA\QBEAESUCCOBGD@DBfDF","@@ICIB@BJHFA","@@GCIBADJFHA","@@VuKogEcbEld","@@\\c]_gA]TClbR","@@AIKD@JH@","@@NOG[UKUHWVEZLNdE","@@RG^WF]EISKklEV","@@DHFDRGHGAoOCWN","@@LRVBxO@a_SUCQJIL","@@DHPRfVTJF@KBA@EQWWYuWEACBGLCT","@@PJHAJ@HWOCQA","@@LAJKGMKDGD@J","@@LJLBNIJMDMCIECKAMFGDIV","@@@BLDNEJKCGIIICIFGF","@@MGIBGF@HHPTD","@@\CDE@IEOKEC@GDEHALDP","@@LgaoNEh\\","@@FHJFNABGGKSGEB","@@b^jFdOVgQcmCkFaP","@@xNRaMoiQQAT","@@nyBKISUIQIeA]FinB\FJZNHDFDPARD","@@\RXABGEKOKUIMCODBNHH","@@QwQKoBELARIVLNXN\AVE","@@BCCMAEICHYGMMEQ@OLOXMN@RNJVZRA\W","@@@DATe@WAOCKGIq@UFEVHP@\\BLPP","@@\\EDCBQAEKKKqGE@[T@FBNHTPf`","@@JAPGRUDI@KCMUOEAw@GDCN@THTVRNH","@@lOQe[SeRHf","@@@\DHRNPFNDNARCR]@IAKIUECGA}@GBCH","@@DRNVZNH@TENKBGD@KMOUII@MDIFKJEH","@@BhBDRNPFFAF@RKFQBKAMGIIEYCG@QH","@@BNTX\RLBHCPcBM@gEYII]CWFILEX","@@DjHVJF\DDA@UCwACEA]DIB","@@PbFDDDnBFCF]AKGI[KS@IDMN","@@L^FDdHzILGLq@G]GAgPo`GN","@@L€FHRDN@ROLOHs@kSWMEGBYVGLGV","@@@JTTVANELGn­HsGSecEAEHOªGN","@@BjV\lP|DbI@iK]wccKeD","@@DHdNrATSFMEWaaICiAEFKd","@@HLpRLEˆ—BMAK‰]K@kNEJ","@@FžHJ^NRB^EFEFMBc{ICwBGD","@@DPLPLHZ@JODYESOMQEMHIL","@@BNJLLDrBREV]TaRWDSBWCQOG[BYDgVWRITENAX","@@BDNN\PF@PCBCBEAUCMe[GAOBAB","@@BLFFnRJXP†NhCRKASIOoWkM™UQ@MHIJAH","@@LLXDRGXGf@PIPOAOmKWAaDQPSV","@@BR\\hH@V@VCLEL_DUCOYkECI@UFKD[j","@@DJXNrRxGFEB_EeEGmQQ@aLGF","@@DVP\\^PÖf†Xn\\JFxxXPܜŠbHH¬äHHŬètV‚LElWPQ^¯AW[c۟}w[kWÏAYGM‡ßiŏ³ĉoÓAQBŸjQLqˆ","@@JJLHLDfAvWÜ_LEFIDI“KEYB}R¯rSVEHD\\@J","@@BHFF\\LF@dUBIOiII[GEBQPAF","@@Fr@FDBhJtADABGNyOoEEGCkCO@EBWt","@@DTÎĂÒҞ|X’J¸@ŠE‚M²]lQVQXUDSWQyHYF£R—J]@»QkI±çė·­uWOCWHEJ","@@HnNVLNЦTNrRXCRCHQBS@…KecsQM½ƒYAyHUP","@@DX^NüŒTFZ@JCJaG[[kyy‘esKUAMHS‚","@@DNnlHBFAfODMAMomKCMAI@IFIT","@@BNRfHJXAHADGDIBs@aCEGAqFEF","@@HlhŒHFnHdELO@MeƒU_a]WGW@","@@D„JV\\bf\\bJfKDGFaUkƒIG]CWBKN","@@BJzŠjZL@FENY@Ke—_uICMJ","@@ZtHDxDH@vQFC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DG@IAOE@WNGDAH@B","@@LNJBNBDABCCEECIIKCE@ADAD","@@DFJHDADC@GCGECEACBCB","@@DFDDJDF@BC@AGMBCHEBAAECAICK@CBAD","@@DFJBT@JEDE@KCECAE@CBEFODEDAD","@@AJ^VHBFCBMJALAFCBMECE@IFYBSA","@@@DDBF@JC@EAEIGA@CBADBD@D","@@DJDDF@FAFAFGBEAEAA[ECBADDH","@@PXHVNHVHJALOJGBIEWWQEGIEMAgFIF@J","@@VHDAFG@AQKI@ODABBDFD","@@NBJAFCDCAEGECECAODAFEHBF","@@FFF@HCDGBECGM@GH@H","@@CDBFNDXBXEDC@EIIEAIFQD","@@A–HPd@xJJVGFQIa@SE}EUBS@ƒIWUCMJ","@@DFJALEFG@ECCOCIJCH","@@HBHAFCDGAEGCKBGH@H","@@BFDBD@BCBCFOAAEAE@CDAJ","@@@JDJDBDAHMLM@CAAKGCBKN","@@BNCLBJLPNBHEBEJIDI@MQ]IGGAG@EDCJ","@@@JFFHBH@NQ@CQKC@EBCJ","@@@DDBB@HGBCACCAC@CH","@@FHFBFADC@CGCCEIAAB@H","@@@JDDDBFABC@GCEECCBCB","@@DBRAJA@A@AGKOIGAE@AD","@@A\FLH@j[PB\JD@BEGM[[[MWCCBBPCF","@@JPPPHDL@RCfKRBZIRIFOBO@K[[OMSIKCMH[B]HIJKRCN@Z","@@FHLLLZFBFABEDSFO@KBeDIHIBEQMKIKCSFIHEZIVBFHJ","@@Ž€PAPKEgcqOcBSRCj@€JÀZPKD_EQo[¯a{IuC™XKRCpDP","@@BFDBNDXEDEACY@KCCBAB","@@\@JBNELKJS@GACKAC@KBSGC@WXIP@FBF","@@JCRYBE@ECCIBAHCFEBADBHABGDAF@DB@","@@FDhPNBHAHGJSBM@IEIMWGEICI@MFGJYj@FDH","@@JJTDt@XGHGHYBQ…qQES@OJILCRARFZ","@@DBDAEGC@@D","@@†PjFP@LCFE@KAMEKMI]S_KOAMD_XGLANDJ","@@DDF@FADABGGMC@E@EDAJBD","@@DBF@DADG@KAACAMDAFBJ","@@HBH@H@DCCGGCKCYQEC@KFA@AAIMEABG@A@@EEAG@ABADTZRTXV","@@LHL@D@FC@EGKC@G@IBCJ","@@RJL@JANDNDHDDBjALM@A@C_O[EK@SFSBUHAD","@@@JHFHDLEFGBM@GCECCEBGJED","@@HEASCGGEG@QFAHDFFDBFDJJB","@@@JDFLBHAHGJEFICIEEIEI@KDCH@J","@@F@D@FCDG@CIGGACBENDH","@@FAFCPM@ECEYEG@CNDNDH","@@JHD@FCFEESOME@CDADCLBDDF","@@DŽCžBFrXZEHII‡G§CICIKG[AMFCF","@@RdHFtHPANCLI@OEMUUmaICK@KBGFCJAV","@@FADEB]@IEEICcBCBEDAJBLFJHFJD","@@FFHBN@NEBE@GACC@]@EDAF","@@LFH@FENHXFDCAKQOSM[EoawkGQLQLENATDTJRTTPbJnHJBHEDOACSKiE[KSQq[WIkEYFQLCRHrPZˆt","@@GBAFFJFBnBLBbJTLFLDTANINIHUDS@GEUCƒCWDYJKBABAF@DLDZ@rC²XPBPCPINKPaBMI]a_iUaGUAMB","@@FBF@BEDA@CEAABACC@CFAD","@@BBJFP@LCJIHUEIMAMDKLEJ","@@AJBDFDHAFEDIACICEB","@@FFJFFAFEAGECEAI@CD@B","@@@FDBLBVADEBCAGGCKCIBGF","@@BPNRDBJ@VAVM@C@MCIKWCCO@UFEHGP"]],"encodeOffsets":[[[114139,17488],[114143,17487],[115046,17318],[114920,17162],[115340,16968],[114394,16944],[114402,16941],[115208,16862],[115350,16779],[115376,16724],[114662,16716],[115108,16687],[115177,16386],[117685,16422],[117546,16276],[114928,16073],[117361,16025],[117008,15924],[120664,15498],[120647,15482],[120115,11344],[120516,11315],[117327,11037],[120028,10993],[118561,10794],[118504,10717],[118537,10713],[117128,10447],[116768,10265],[117331,10198],[117292,10125],[117334,10121],[117045,10091],[117199,10052],[117468,9971],[115666,9869],[115213,9774],[116907,9610],[118761,9546],[114208,9500],[119552,9274],[116674,9088],[117547,8357],[117611,7419],[116327,7130],[115256,6123],[114700,3943],[114916,3974],[114943,4040],[115229,5934],[115172,5878],[115047,5757],[115162,5626],[115224,5792],[115286,5696],[115315,5497],[115259,5233],[115355,5230],[115618,5113],[115935,6458],[116629,8198],[116840,8294],[117257,8316],[117423,8408],[117626,8176],[117708,7690],[116631,7790],[117932,8588],[118025,8714],[118282,8695],[112092,7521],[112575,8037],[113111,8312],[113112,7987],[113264,8204],[114217,7726],[114351,7835],[114232,7996],[114319,8097],[114612,8265],[115602,8033],[115656,8612],[115985,8322],[115940,8268],[116389,9453],[116366,9193],[116935,8975],[117350,9059],[116713,9086],[115563,9760],[115582,9803],[115601,9815],[115638,9855],[115647,9865],[115714,9887],[114383,9538],[114139,8730],[114901,9048],[114939,9088],[115043,9141],[115239,9059],[115532,9125],[118618,9943],[118831,10338],[118941,9810],[119266,10046],[119065,9093],[116999,10061],[116324,10487],[117089,9988],[117369,10205],[116976,10393],[117041,10421],[116985,10488],[117286,10501],[117443,10595],[117318,10662],[117608,11086],[117450,11269],[117320,11593],[117217,11097],[117241,10975],[117442,11745],[117311,11010],[116929,11294],[117669,11124],[119985,10861],[120455,10884],[118622,11107],[119438,10757],[119637,10729],[120073,10569],[120165,10333],[120082,10949],[120598,11033],[120269,11331],[119831,11331],[119529,11778],[118131,14284],[119496,16738],[120534,15547],[117457,16559],[117196,16419],[116955,16426],[116674,16216],[116627,16047],[116445,15975],[116594,15849],[116718,15790],[116977,15806],[117205,15974],[116691,9053],[116500,7821],[117302,10182],[114910,9080],[118496,10787],[118482,10760],[119225,10034],[115706,19940],[116565,19619],[116844,16389],[114927,17405],[115039,17227],[115597,17187],[115428,17077],[113865,16169],[114176,16847],[114254,16879],[114265,16901],[114280,16933],[114336,16963],[114371,16963],[114372,16986],[114421,16854],[114392,16849],[117134,11742],[117095,11726],[117075,11704],[117044,11663],[117543,11420],[117058,11319],[117000,11341],[117026,11320],[116805,11180],[117110,10628],[117158,10638],[117226,10628],[117094,10421],[116579,10260],[117138,10138],[117073,10127],[117022,10092],[116997,10004],[117019,9946],[117142,10031],[117240,10088],[118603,11077],[118583,10988],[118135,10502],[118050,10437],[118274,10155],[118207,9620],[119285,10646],[119315,9976],[119355,9980],[119394,9970],[119253,9395],[114338,8881],[114610,8852],[114444,16448],[117283,10971],[117171,10929],[117097,10989],[115689,9883],[116524,7551],[117267,10171],[117254,10160],[117205,10142],[117261,10110],[117209,10077],[119734,9690],[117371,11707],[117418,7773],[115986,6518],[114385,16599],[114330,16646],[114417,16587],[115732,9895],[115730,9909],[117049,10113],[116962,10456],[116960,11327],[117745,11345]]]},"properties":{"cp":[112.34882,16.831039],"name":"三沙市","childNum":233}}

pissang commented 8 years ago

coordinates下用逗号分隔的一个个UTF-8字符串,每个字符串都是一片区域,你可以删掉后面那些试试

tianr1190 commented 8 years ago

encodeOffsets 这个表示什么意思呢? childNum应该是表示小岛的数量吧?

pissang commented 8 years ago

嗯 childNum 是多边形区域数量,encodeOffsets 是解压需要的信息,跟 coordinates 一一对应

tianr1190 commented 8 years ago

可以了, 只保留三沙市前面三个岛显示效果就挺好。效果是这样: image 非常感谢 @pissang

tianr1190 commented 8 years ago

三沙市的geoJson数据修改后如下: {"id":"460300","geometry":{"type":"MultiPolygon","coordinates":[["@@KCOLAJBJDDVFRHJB\JfVXFZBRATGPMHS@KGKOKqO[QUGQCOAGFCZDFLA\ALHHNLHNFT@JDBJELYAiQaEQESQ","@@HCFCFEBGEKMAMLCHAH","@@KDEFShGJSNGJGJIFCF@HBHDDDBXE^QbcR]DICMCGIC"]],"encodeOffsets":[[[114139,17488],[114143,17487],[115046,17318]]]},"properties":{"cp":[112.34882,16.831039],"name":"三沙市","childNum":3}}

zhuiluo0987 commented 6 years ago

你的Echarts是版本几,为什么我删除coordinates的几个数组以后会不能加载海南的地图。而且我用你写的三沙市的geoJson也还是不能加载海南地图了?这是为什么

tianr1190 commented 6 years ago

当时用的ECharts 版本是3.0 @zhuiluo0987

zgn466048148 commented 6 years ago

修改json以后地图不能使用,似乎是coordinates的值和你的数据不一样,但是使用我这边原本的数据也不行,求修改后的json代码

DaikonX commented 4 years ago

我三沙市只留了一个岛; { "id": "460300", "geometry": { "type": "MultiPolygon", "coordinates": [["@@HCFCFEBGEKMAMLCHAH"]], "encodeOffsets": [[[115046, 17318]]] }, "properties": { "cp": [112.34882, 16.831039], "name": "三沙市", "childNum": 3 } }, 然后在echarts.registerMap的specialAreas参数加入 { 三沙市: { left: 110.63119, top: 18.031971, width: 0.05 } },

image

具体调整查看https://echarts.apache.org/zh/api.html#echarts.registerMap