Git Product home page Git Product 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 vue3-basic-admin后台管理系统,有兴趣可以看看:vue3-basic-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

捐赠

开源不易,若觉得这个项目对你有用,可以点个star,欢迎提出建议和bug 😄 。如果这个项目对你有所帮助,可以给作者买杯咖啡,欢迎投喂,任意金额捐赠加好友问题咨询。

alipaywechat

扫码领大红包啦,有朋友领到88元大红包

alipay

echartsmap's People

Contributors

biubiubiu01 avatar gist07 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.