You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/11/08 09:45:34 UTC

[GitHub] [echarts] fuxiao82 commented on issue #4290: 有没有完整的俄罗斯的图的json或者js文件?(就像中国地图那样的全国地图)世界地图中的俄罗斯地图被分成两块了

fuxiao82 commented on issue #4290:
URL: https://github.com/apache/echarts/issues/4290#issuecomment-962977429


   const regisOption: RegisOption = {
       type: 'FeatureCollection',
       crs,
       features: world.map((item) => {
             if (item.properties.name !== '俄罗斯') {
               return item
             }
             item.geometry.coordinates.forEach((detail) => {
               detail[0].forEach((itemDetail) => {
                 //地图坐标需要转换,经过分析,经度小于-20度的加上360就可以了!
                 if (itemDetail[0] < -20) {
                   itemDetail[0] += 360
                 }
               })
             })
             return item
           })
     }
   
   
   world like:
   [{
     "geometry": {
         "type": "Polygon",
         "coordinates":[...]
     },
     "properties": {
         "name": "俄罗斯",
         "childNum": 1
     }
   },{},{},...]
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org