Giter VIP home page Giter VIP logo

echartsmap's Introduction

EchartsMap

使用echarts+Amap 获取行政区边界的geoJson 前提准备:首先你要去高德api上申请密钥,免费的,一天可以发出5000次请求,次数太多了你要去花钱申请企业版,直通车:https://developer.amap.com/

地址预览:https://gist006.gitee.io/echartsmap/#/

vue-antd-admin后台管理系统,有兴趣可以看看:vue-antd-admin

渲染步骤主要分为:

  1. 根据行政区code去获取行政区边界geoJson

    你要先cdn引入:

    <script src='http://webapi.amap.com/maps?v=1.3&key='你申请的key'&plugin=AMap.DistrictSearch'></script>
    <script src="//webapi.amap.com/ui/1.0/main.js"></script>
    

    在build/webpack.base.conf.js里面让webpack不处理aMap的依赖库

    externals: { 'AMap':'AMap', 'AMapUI': 'AMapUI' }

    通过AMapUI的DistrictExplorer 方法去获取行政区geoJson

    具体可查看:https://lbs.amap.com/api/amap-ui/reference-amap-ui/geo/district-explorer

  2. 获取地图数据

  3. 渲染echarts图

  4. 点击地图下钻

地图主要分为:

分布图、散点图、热力图、航线图等

--npm install

--cd EchartsMap

--npm run dev

掘金:https://juejin.im/user/5d6cc5b56fb9a06acf2b747f

echarts社区:https://gallery.echartsjs.com/explore.html?u=bd-4240785066&type=work#sort=ranktimeframe=allauthor=all

echartsmap's People

Contributors

biubiubiu01 avatar gist07 avatar

Watchers

James Cloos 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.