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

at-gis

v1.3.0

Published

安图GIS,封装Vue的ifame组件,方便Vue框架通过iframe嵌入图形应用系统

Downloads

10

Readme

at-gis


at-gis 基于 Vue.js 2.0 的前端组件库,目前只有GisHome一个组件,方便Vue框架通过GisHome嵌入安图二三维一体化平台,也支持嵌入onemapV4.0、onemapV5.0、AtThree,此时组件需要指定 project-name(仅公司内部使用)。

使用 npm 安装

npm install at-gis

全局注册组件

可以在项目的入口文件中引入所有组件或所需组件

main.js

import ATGIS from 'at-gis' 

Vue.use(ATGIS)

局部注册并使用组件

嵌入二三维一体化(webgis)

<template>
    <gis-home :url="url" @gis-call="gisCall" ref="gisHome"></gis-home>
</template>

嵌入onemapV4.0或onemapV5.0,需要指定project-name属性为"OneMap4JS"

<template>
    <gis-home :url="url" @gis-call="gisCall" ref="gisHome" project-name="OneMap4JS"></gis-home>
</template>

嵌入AtThree,需要指定project-name属性为"at-three"

<template>
    <gis-home :url="url" @gis-call="gisCall" ref="gisHome" project-name="at-three"></gis-home>
</template>
import { GisHome } from 'at-gis'

export default {

    components: {
        GisHome
    },
    data: function () {
        return {
            url: 'http://localhost:8081/WebMap/map'
        }
    },
    methods: {
        /**
         * 监听图形事件
         * type:事件名
         * requstInfo:请求信息
         * data:数据
         */
        gisCall({type, requstInfo, data}) {
            console.log(type, requstInfo, data)
        },
        /**
         *调用图形接口示例
         */
        callGis() {
            let obj = {
                requstInfo: {
                    sendId: '1',//同一页面请求标识
                },//请求页面的信息,回传时,会将该对象直接返回
                type: 0,//接口类型,-1:初始化类,0:功能接口类
                param: {
                    /**
                     * 显示图层,同时是否需要关闭已经显示(非底图)的其他图层
                     * 支持模式:2D、3D
                     * @param layers,要显示的图层组
                     * @param closeOther,是否关闭其他非底图图层(默认false)
                     */
                    visibleLayers: {
                        layers: ['gm-scene-1'], closeOther: false
                    }
                }
            }
            this.$refs.gisHome.callGis(obj)
        }
    }
}