@zhangdali1996/lr-map-viewer 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -56,16 +56,12 @@ public/
56
56
  <script setup>
57
57
  import { LrMapViewer } from '@zhangdali1996/lr-map-viewer'
58
58
 
59
+ const credentialKey = 'your_credential_key'
60
+
59
61
  const lr3dConfig = {
60
62
  // 是否在场景初始化成功后自动加载云 GIS 数据
61
63
  autoLoad: true,
62
64
  cloud: {
63
- // 云 GIS 服务地址
64
- server: 'https://your-cloud-gis-server/',
65
- // 云 GIS 用户名
66
- username: 'your_username',
67
- // 云 GIS 密码
68
- password: 'your_password',
69
65
  // 数据源 guid
70
66
  dsGuid: 'your_ds_guid',
71
67
  // 三维场景基点
@@ -88,7 +84,7 @@ const lr3dConfig = {
88
84
 
89
85
  <template>
90
86
  <div style="height: 100vh;">
91
- <LrMapViewer :lr3d-config="lr3dConfig" />
87
+ <LrMapViewer :lr3d-config="lr3dConfig" :credential-key="credentialKey" />
92
88
  </div>
93
89
  </template>
94
90
  ```
@@ -99,6 +95,8 @@ const lr3dConfig = {
99
95
  <script setup>
100
96
  import { LrMapViewer } from '@zhangdali1996/lr-map-viewer'
101
97
 
98
+ const credentialKey = 'your_credential_key'
99
+
102
100
  const map2dConfig = {
103
101
  behavior: {
104
102
  autoInitLayer: true,
@@ -107,18 +105,20 @@ const map2dConfig = {
107
105
  },
108
106
  options: {
109
107
  ygis_dsGuid: 'your_ds_guid',
110
- ygis_url: 'https://your-cloud-gis-server/',
111
- Url: 'https://your-map-server/',
112
108
  layerName: 'your_layer_name',
113
109
  layerCode: '',
114
- token: 'your_token',
115
110
  },
116
111
  }
117
112
  </script>
118
113
 
119
114
  <template>
120
115
  <div style="height: 100vh;">
121
- <LrMapViewer mode="2d" :modes="['2d']" :map2d-config="map2dConfig" />
116
+ <LrMapViewer
117
+ mode="2d"
118
+ :modes="['2d']"
119
+ :map2d-config="map2dConfig"
120
+ :credential-key="credentialKey"
121
+ />
122
122
  </div>
123
123
  </template>
124
124
  ```
@@ -131,22 +131,18 @@ import { ref } from 'vue'
131
131
  import { LrMapViewer } from '@zhangdali1996/lr-map-viewer'
132
132
 
133
133
  const activeMode = ref('2d')
134
+ const credentialKey = 'your_credential_key'
135
+
134
136
  const map2dConfig = {
135
137
  options: {
136
138
  ygis_dsGuid: 'your_ds_guid',
137
- ygis_url: 'https://your-cloud-gis-server/',
138
- Url: 'https://your-map-server/',
139
139
  layerName: 'your_layer_name',
140
- token: 'your_token',
141
140
  },
142
141
  }
143
142
 
144
143
  const lr3dConfig = {
145
144
  autoLoad: true,
146
145
  cloud: {
147
- server: 'https://your-cloud-gis-server/',
148
- username: 'your_username',
149
- password: 'your_password',
150
146
  dsGuid: 'your_ds_guid',
151
147
  basePoint: {
152
148
  x: 37517614.46684,
@@ -165,6 +161,7 @@ const lr3dConfig = {
165
161
  :modes="['2d', '3d']"
166
162
  :map2d-config="map2dConfig"
167
163
  :lr3d-config="lr3dConfig"
164
+ :credential-key="credentialKey"
168
165
  />
169
166
  </div>
170
167
  </template>
@@ -175,6 +172,7 @@ const lr3dConfig = {
175
172
  ```vue
176
173
  <LrMapViewer
177
174
  :lr3d-config="lr3dConfig"
175
+ :credential-key="credentialKey"
178
176
  :show-region-panel="true"
179
177
  :show-debug-panel="true"
180
178
  />
@@ -216,6 +214,8 @@ createApp(App).use(LrMapViewerPlugin).mount('#app')
216
214
  二维图纸运行时配置。
217
215
  - `lr3dConfig`
218
216
  龙软三维运行时配置。
217
+ - `credentialKey`
218
+ 内部凭证解密 Key,二维与三维都会使用它解析内置认证信息。
219
219
  - `showRegionPanel`
220
220
  是否显示区域显隐面板,默认 `false`。
221
221
  - `showDebugPanel`