npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mbvue

v1.0.3

Published

## 灵感

Downloads

11

Readme

mbvue

灵感

mbvue 是一套为 Vue 应用使用的 MapboxGL 风格的 地图 组件库。❤

灵感来自于 Github 上的 arturbien/React95 项目。

npm 安装

npm install mbvue

npm install less less-loader -D

需要安装 lessless-loader

快速上手

将介绍如何使用 mbvue

引入 mbvue

你可以引入整个 mbvue,或是根据需要仅引入部分组件。我们先介绍如何引入完整的 mbvue。

完整引入

1.将node_module下的mbvue文件夹中的dist文件夹的内容拷贝到工程的public目录下 2.在index.html添加两项连接

在 main.js 中写入以下内容:

import Vue from 'vue'
import ElementUI from 'element-ui';

import MBMapCom, { 
  addHugePoints,
  drawCircleSymbol,
  queryGeometry, 
  filterKeySearch, 
  clearSpatial,
  RouteTrack, InfoWindow,  
  filterKeyPOI,
  filterKey } from 'mbvue';

Vue.use(MBMapCom);
Vue.use(RouteTrack);
Vue.use(InfoWindow);

Vue.config.productionTip = false
Vue.prototype.addHugePoints = addHugePoints
Vue.prototype.drawCircleSymbol = drawCircleSymbol
Vue.prototype.queryGeometry = queryGeometry
Vue.prototype.filterKeySearch = filterKeySearch
Vue.prototype.clearSpatial = clearSpatial
Vue.prototype.filterKeyPOI = filterKeyPOI
Vue.prototype.filterKey = filterKey

new Vue({
  render: h => h(App),
}).$mount('#app')

在 App.vue 中写入以下内容:

<template>
 
    <sl-mbmap  :mapContainerID = "mapContainerID" :minZoom="minZoom" :mapStyle = 'mapStyle' :extent = 'extent' :maxZoom="maxZoom" :center="center" :zoom="zoom"   >    
    </sl-mbmap>
 
   
</template>
<script>
 
export default {
  name: "app",
  data() {
   return {
        mapContainerID:'mapContainer',
        zoom: 9,
        minZoom:0,
        maxZoom:18,
        poiID:'poi',
        extent:{
            maxX: 102.25874537880524,
            maxY: 31.455581919611046,
            minX: 110.35124415810212,
            minY: 30.91313196843917
        },
        drawType:"Point",
        mapStyle:"./json/rstyle.json",
        center:[121.434576,31.255456],
        projection: 'EPSG:4326',
        poiMap:{},
        drawActive:false,
        serverurl: "http://172.20.32.31:7001/geometry",
        tablename:"qingpufinalroad",
        query:false
    }
  },
  mounted () {
      
  },
  methods:{  
 
  } 


};
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>