Skip to content

Commit a524c17

Browse files
committed
Merge branch 'dev'
2 parents 569e2f0 + c091fea commit a524c17

34 files changed

+1799
-145
lines changed

demo/iconfont/iconfont.html

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" targ
5454
<div class="content unicode" style="display: block;">
5555
<ul class="icon_lists dib-box">
5656

57+
<li class="dib">
58+
<span class="icon sm-components-icon-">&#xe662;</span>
59+
<div class="name">地图切换</div>
60+
<div class="code-name">&amp;#xe662;</div>
61+
</li>
62+
5763
<li class="dib">
5864
<span class="icon sm-components-icon-">&#xe6a0;</span>
5965
<div class="name">complete</div>
@@ -438,9 +444,9 @@ <h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</co
438444
<pre><code class="language-css"
439445
>@font-face {
440446
font-family: 'sm-components-icon-';
441-
src: url('iconfont.woff2?t=1730441116037') format('woff2'),
442-
url('iconfont.woff?t=1730441116037') format('woff'),
443-
url('iconfont.ttf?t=1730441116037') format('truetype');
447+
src: url('iconfont.woff2?t=1754981391771') format('woff2'),
448+
url('iconfont.woff?t=1754981391771') format('woff'),
449+
url('iconfont.ttf?t=1754981391771') format('truetype');
444450
}
445451
</code></pre>
446452
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -466,6 +472,15 @@ <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面
466472
<div class="content font-class">
467473
<ul class="icon_lists dib-box">
468474

475+
<li class="dib">
476+
<span class="icon sm-components-icon- sm-components-icon-dituqiehuan"></span>
477+
<div class="name">
478+
地图切换
479+
</div>
480+
<div class="code-name">.sm-components-icon-dituqiehuan
481+
</div>
482+
</li>
483+
469484
<li class="dib">
470485
<span class="icon sm-components-icon- sm-components-icon-complete"></span>
471486
<div class="name">
@@ -1042,6 +1057,14 @@ <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h
10421057
<div class="content symbol">
10431058
<ul class="icon_lists dib-box">
10441059

1060+
<li class="dib">
1061+
<svg class="icon svg-icon" aria-hidden="true">
1062+
<use xlink:href="#sm-components-icon-dituqiehuan"></use>
1063+
</svg>
1064+
<div class="name">地图切换</div>
1065+
<div class="code-name">#sm-components-icon-dituqiehuan</div>
1066+
</li>
1067+
10451068
<li class="dib">
10461069
<svg class="icon svg-icon" aria-hidden="true">
10471070
<use xlink:href="#sm-components-icon-complete"></use>

demo/iconfont/iconfont.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/.vuepress/config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ module.exports = {
138138
'control/layer-manager',
139139
'control/coordinate-conversion',
140140
'control/fly-to',
141-
'control/layer-color'
141+
'control/layer-color',
142+
'control/base-layer-switcher'
142143
]
143144
},
144145
{
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# 底图切换
2+
3+
```vue
4+
<sm-web-map server-url="https://iportal.supermap.io/iportal/" map-id="801571284">
5+
<sm-base-layer-switcher position="bottom-right" :layers="layers" />
6+
</sm-web-map>
7+
```
8+
9+
### Attributes
10+
11+
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
12+
|:--------------|:-----------------|:--------------------------------|:--------|:-------|
13+
| layers | 底图列表 | Array<[LayerItem](#layeritem)> | - | - |
14+
| defaultLayer | 默认底图的唯一标识 | string | string | - |
15+
| baseLayerInfo | 原始底图信息 | [BaseLayerInfo](#baselayerinfo) | boolean | true |
16+
17+
> 支持[主题混入参数](/zh/api/mixin/mixin.md#theme)[Control 混入参数](/zh/api/mixin/mixin.md#control)
18+
19+
### LayerItem
20+
21+
| 参数 | 说明 | 类型 | 是否必填 |
22+
|:----------|:--------------|:------------------------------------------------------------------------|:--------|
23+
| id | 底图唯一标识 | string ||
24+
| title | 底图名称 | string ||
25+
| layers | MapboxGL 图层 | Array<[Layers](https://docs.mapbox.com/style-spec/reference/layers/)> ||
26+
| sources | MapboxGL 数据源 | Array<[Sources](https://docs.mapbox.com/style-spec/reference/sources/)> ||
27+
| thumbnail | 底图缩略图 | string ||
28+
29+
### BaseLayerInfo
30+
31+
| 参数 | 说明 | 类型 | 是否必填 |
32+
|:----------|:---------|:--------|:--------|
33+
| show | 显示原底图 | boolean ||
34+
| title | 底图名称 | string ||
35+
| thumbnail | 底图缩略图 | string ||

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ module.exports = {
4343
'!mapboxgl/*/__tests__/**/type.{js,jsx}'
4444
],
4545
transformIgnorePatterns: [
46-
'node_modules/(?!(mapbox-gl|axios|element-ui|ant-design-vue|geographic-coordinate-converter|videojs-flvjs-es6|vue-videojs7|three)/)'
46+
'node_modules/(?!(ol|mapbox-gl|axios|element-ui|ant-design-vue|geographic-coordinate-converter|videojs-flvjs-es6|vue-videojs7|three)/)'
4747
],
4848
modulePaths: ['src', 'node_modules'],
4949
reporters: ["default", "jest-teamcity"],

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@supermapgis/vue-iclient",
3-
"version": "12.0.0-r",
3+
"version": "12.0.1-r",
44
"description": "SuperMap iClient for Vue.js",
55
"homepage": "https://iclient.supermap.io",
66
"scripts": {
@@ -53,6 +53,7 @@
5353
"css-vars-ponyfill": "2.2.1",
5454
"echarts": "^4.8.0",
5555
"echarts-liquidfill": "^2.0.5",
56+
"fast-xml-parser": "^5.2.5",
5657
"flush-promises": "^1.0.2",
5758
"flv.js": "^1.5.0",
5859
"geojson": "^0.5.0",
@@ -77,6 +78,7 @@
7778
"mapbox-gl-compare": "^0.4.0",
7879
"mapv": "^2.0.34",
7980
"mux.js": "^5.6.7",
81+
"ol": "^6.15.1",
8082
"omit.js": "^2.0.2",
8183
"proj4": "^2.8.0",
8284
"resize-detector": "^0.2.0",

src/common/_assets/iconfont/icon-sm-components.css

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@font-face {
22
font-family: "sm-components-icon-"; /* Project id 2236405 */
3-
src: url('icon-sm-components.woff2?t=1728443762490') format('woff2'),
4-
url('icon-sm-components.woff?t=1728443762490') format('woff'),
5-
url('icon-sm-components.ttf?t=1728443762490') format('truetype');
3+
src: url('icon-sm-components.woff2?t=1754981391771') format('woff2'),
4+
url('icon-sm-components.woff?t=1754981391771') format('woff'),
5+
url('icon-sm-components.ttf?t=1754981391771') format('truetype');
66
}
77

88
[class^="sm-components-icon-"], [class*=" sm-components-icon-"], .sm-components-icon {
@@ -13,6 +13,10 @@
1313
-moz-osx-font-smoothing: grayscale;
1414
}
1515

16+
.sm-components-icon-dituqiehuan:before {
17+
content: "\e662";
18+
}
19+
1620
.sm-components-icon-complete:before {
1721
content: "\e6a0";
1822
}
260 Bytes
Binary file not shown.
172 Bytes
Binary file not shown.
44 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)