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

@supermap/vue-iclient3d-webgl

v1.0.9

Published

Supermap iClient3D WebGL for Vue.js

Downloads

50

Readme

@supermap/vue-iclient3d-webgl

简介

  • 官网:http://support.supermap.com.cn:8090/webgl/examples/component/examples.html#layer
  • 源码:

安装

npm install @supermap/vue-iclient3d-webgl

开发

方法一:Vue工程,NPM 安装:

#####1、修改main.js文件:

import Vue from 'vue';
import App from './App.vue';


//引用第三方库
import ViewUI from 'view-design';
import 'view-design/dist/styles/iview.css';
Vue.use(ViewUI);

import axios from 'axios'
window.axios = axios //挂载到window上

import echarts from 'echarts'
window.echarts = echarts //挂载到window上

//引用@supermap/vue-iclient3d-webgl组件库
import VueiClientWebgl from '@supermap/vue-iclient3d-webgl';
Vue.use(VueiClientWebgl);
 
new Vue({
  el: '#app',
  render: h => h(App)
});

#####2、修改index.html文件:

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <title>vue-iclient3d-webgl</title>

  <!--    组件css-->
  <link href="./static/css/geoFont/iconfont.css" rel="stylesheet">

  <!--    Cesium-->
  <link href="./static/Cesium/Widgets/widgets.css" rel="stylesheet">
  <script src="./static/Cesium/Cesium.js"></script>

  <!--    supermap-->
  <script src="./static/js/config.js"></script>
  <script src="./static/js/tooltip.js"></script>

</head>

<body>
  <div id="app"></div>
  <!--    supermap组件-->
  <script src="./dist/vue-iclient3d-webgl.min.js"></script>
</body>

</html>

#####3、在 vue 工程中的App.vue 中标签引入组件:

<template>
  <div id="app">
    <sm-viewer>
    <sm3d-measure></sm3d-measure>
    </sm-viewer>
  </div>
</template>

方法二:在 html中通过CDN引入,使用组件:


<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <title>cdn引入测试</title>

  <!-- //引入Cesium依赖 -->
  <link href="./node_modules/@supermap/iclient3d-webgl/Cesium/Widgets/widgets.css" rel="stylesheet">
  <script src="./node_modules/@supermap/iclient3d-webgl/Cesium/Cesium.js"></script>
  
  <!-- //引入Vue.js -->
  <script src="https://unpkg.com/vue/dist/vue.js"></script>

  <link href="./node_modules/@supermap/vue-iclient3d-webgl/static/css/geoFont/iconfont.css" rel="stylesheet">

  <!-- //引入view-design控件库 -->
  <link rel="stylesheet" href="//unpkg.com/view-design/dist/styles/iview.css">
  <script src="//unpkg.com/view-design/dist/iview.min.js"></script>

  <!-- //引入组件的库 -->
  <script src="./node_modules/@supermap/vue-iclient3d-webgl/dist/vue-iclient3d-webgl.min.js"></script>

  <style>
    html,
    body,
    #app {
      width: 100%;
      height: 100%;
      margin: 0;
      padding: 0;
      overflow: hidden;
    }

  </style>
</head>

<body>
  <div id="app">
    <sm-viewer :scene-url="URL">
      <sm3d-measure></sm3d-measure>
    </sm-viewer>
  </div>

  <script>
    new Vue({
      el: '#app',
      data: {
        URL: "http://www.supermapol.com/realspace/services/3D-ZF_normal/rest/realspace"
      },
      methods: {}
    })
  </script>
</body>


</html>

  

示例

http://support.supermap.com.cn:8090/webgl/examples/component/examples.html#layer