首页 / 浏览问题 / 三维GIS / 问题详情
iclient3d for vue如何加载iserver三维数据
4EXP 2024年01月18日
我尝试使用iclient3d vue for webgl加载iserver的示例数据,但是只要将示例代码的url替换为自己的url就无法加载,App.vue代码是:

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

  </div>
</template>

<script>

export default {
  name: 'App',
  data () {
    return {
      url: "http://100.77.230.103:8092/iserver/services/3D-CBD/rest/realspace"
    };
  }
};
</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>

2 个回答

你好,您是在本地代码修改的还是官网示例修改的url呢?建议您在本地修改url来加载服务
545EXP 2024年01月19日
是在本地修改的url,URL中的IP也是本地的IP
有App.vue格式的完整源码可以参考吗?

您好,webgl的vue组件单纯加载数据,只用url即可,如

    let vm = new Vue({
        el: '#app',
        data: {
            URL: "http://www.supermapol.com/realspace/services/3D-ZF_normal/rest/realspace"
        }
    });

API参考:http://support.supermap.com.cn:8090/webgl/examples/component/dist/zh/api/guide/installation.html

示例参考:http://support.supermap.com.cn:8090/webgl/examples/component/examples.html#layer

希望可以帮到您。

9,638EXP 2024年01月19日
...