0.0.3 • Published 3 years ago

les-vue-map v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

项目名称

les-vue-map

简述

use vue2.0, map interface for the traffic industry

如何使用

安装依赖包

npm install --save les-vue-map

全局引入(后续更新模板加载)

import mapZ from "les-vue-map"
Vue.use(mapZ)

模板引入

<template>
    <div>
      <les-map :options="options" style="height: 800px;" @on-map="getMap" ></les-map>
    </div>
</template>
<script>
    export default {
        data() {
            return {
                options: {
                   options:{
                       center: [118.81556749353571, 31.993362852851497],
                       zoom: 13,
                       projection: 'EPSG:4326'
                   },
                },
                map: ""
            };
        },
        methods: {
            getChan(map) {
                this.map = map;
            }
        }
    };
</script>
>效果图

![渲染图](https://upload-images.jianshu.io/upload_images/1318449-038d20d2a8175722.png?imageMogr2/auto-orient/strip|imageView2/2/w/1200/format/webp "效果图")