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

airmap

v0.9.4

Published

``` npm install airmap ``` ## 2 引入 ``` import airmap from 'airmap' import 'airmap/airmap.css' ``` ## 3 全局注册 ``` Vue.use(airmap,{mapTheme:'dark'}) ``` ## 4 页面使用 ``` <vmap :mapKey='地图id' :options='options'> <!--这里可以加入自定义的工具按钮,如下所示--> <template v-slo

Downloads

14

Readme

airmap

1 安装

npm install airmap

2 引入

import airmap from 'airmap'
import 'airmap/airmap.css'

3 全局注册

Vue.use(airmap,{mapTheme:'dark'})

4 页面使用

<vmap :mapKey='地图id' :options='options'>
    <!--这里可以加入自定义的工具按钮,如下所示-->
    <template v-slot:tool-after-工具名>
        <el-tooltip content="导出地图" placement="left" effect="dark" popper-class="shadow-box-popper shadow-box dark">
        <i class="el-icon-picture toolbox-icon i-18x" @click="printMap"></i>
        </el-tooltip>
    </template>
</vmap>

5 自定义Option

{
    baseUrl:'',//地图服务baseUrl
    retainNaipLayer:true,//是否保留NAIP图层
    defaultWorldLayer:false,//是否加载默认的世界地图
    contextMenus:[
        { 'key': 'posToZh', 'title': '定位到中国', 'icon': 'iconfont iconzhongguoditu', 'layer': 'all',showFun:true,
          callback:(e)=>{
            this.fitExtent()
          } 
        },
    ],
    control:{
        mousePosition:true,
        scaleLine:true,
        toolBar:{
            show:true,
            zoomin:true,
            zoomout:true,
            posToChina:true,
            layerControl:true,
            locate:true,
            measure:true,
            distCircle:true,
            printMap:true
        },
        searchBox:false,
        contextMenu:true
    }
}

5.1 自定义右键菜单

{
    key:'',
    title:'',
    icon:'',
    layer:'',
    showFun:Boolean/Function,
    callback:(e)=>{
        //其中e中封装事件对象的id
    }
}

5.2 自定图层参数

{
    title: '运输机场',//标题
    gtype: 'point',  //类型
    gicon: 'fa fa-xing',//图标
    allowLabel: true,//是否支持标注
    allowFilter: true,//是否允许过滤
    appendToLyrCtl: true,//是否加入图层控制
    allowReload: false,//是否可以重新加载图层元素
    glabel: true,//显示隐藏标注
    visible: false,//显示隐藏图层
    dFilter: '',//cql 过滤条件
    minZoom: 4,//初始过滤
    tooltip:true,//字符串模板函数(f)=>{return `${f.name}`}
}

更多layer参数见openlayers官网图层参数Api