Coder Social home page Coder Social logo

echarts-demo's Introduction

echarts-demos

echarts 学习 栗子

echarts绘制3D城市地图

**地图/各省地图/市级地图

使用方式相同 唯一的区别是导入不同的 json文件

通过使用 series-map3D 可以绘制3D地图

1.需要先下载echarts.js,然后额外下载 echarts-gl.js,并在页面中引入

2.通过json导入地图数据

$.get('map/json/china.json', function (chinaJson) {
    echarts.registerMap('china', chinaJson); // 注册地图
    var chart = echarts.init(document.getElementById('main'));
    chart.setOption({
        series: [{
            type: 'map',
            map: 'china' // 注册的地图名称
        }]
    });
});

/map/目录下有**地图以及 各省市的 地图 json文件 /map/geoCitys.js是省市关联文件 level代表行政级别 code代表城市编码

dome代码地址 https://github.com/zhaosheng808/echarts-demo

地图数据json文件可能不准确 可以自行下载替换 DATAV

省市区 各级地图展示 ./1/1.png

./1/2.png

./1/3.png

echarts-demo's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.