Skip to content

Commit

Permalink
替换为椭球资源
Browse files Browse the repository at this point in the history
  • Loading branch information
supermapliukaiyun committed Jul 7, 2023
1 parent e602dea commit e959a8e
Show file tree
Hide file tree
Showing 25 changed files with 699 additions and 499 deletions.
75 changes: 72 additions & 3 deletions SuperMap iEarth/src/assets/icons/demo_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,24 @@ <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" targ
<div class="content unicode" style="display: block;">
<ul class="icon_lists dib-box">

<li class="dib">
<span class="icon iconfont">&#xe88c;</span>
<div class="name">空间距离</div>
<div class="code-name">&amp;#xe88c;</div>
</li>

<li class="dib">
<span class="icon iconfont">&#xe88e;</span>
<div class="name">依地距离</div>
<div class="code-name">&amp;#xe88e;</div>
</li>

<li class="dib">
<span class="icon iconfont">&#xe88d;</span>
<div class="name">投影</div>
<div class="code-name">&amp;#xe88d;</div>
</li>

<li class="dib">
<span class="icon iconfont">&#xe88b;</span>
<div class="name">立方体</div>
Expand Down Expand Up @@ -720,9 +738,9 @@ <h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</co
<pre><code class="language-css"
>@font-face {
font-family: 'iconfont';
src: url('iconfont.woff2?t=1687940482534') format('woff2'),
url('iconfont.woff?t=1687940482534') format('woff'),
url('iconfont.ttf?t=1687940482534') format('truetype');
src: url('iconfont.woff2?t=1688638347789') format('woff2'),
url('iconfont.woff?t=1688638347789') format('woff'),
url('iconfont.ttf?t=1688638347789') format('truetype');
}
</code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
Expand All @@ -748,6 +766,33 @@ <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面
<div class="content font-class">
<ul class="icon_lists dib-box">

<li class="dib">
<span class="icon iconfont iconkongjianjuli"></span>
<div class="name">
空间距离
</div>
<div class="code-name">.iconkongjianjuli
</div>
</li>

<li class="dib">
<span class="icon iconfont iconyidijuli1"></span>
<div class="name">
依地距离
</div>
<div class="code-name">.iconyidijuli1
</div>
</li>

<li class="dib">
<span class="icon iconfont icontouying"></span>
<div class="name">
投影
</div>
<div class="code-name">.icontouying
</div>
</li>

<li class="dib">
<span class="icon iconfont iconlifangti"></span>
<div class="name">
Expand Down Expand Up @@ -1747,6 +1792,30 @@ <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h
<div class="content symbol">
<ul class="icon_lists dib-box">

<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#iconkongjianjuli"></use>
</svg>
<div class="name">空间距离</div>
<div class="code-name">#iconkongjianjuli</div>
</li>

<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#iconyidijuli1"></use>
</svg>
<div class="name">依地距离</div>
<div class="code-name">#iconyidijuli1</div>
</li>

<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icontouying"></use>
</svg>
<div class="name">投影</div>
<div class="code-name">#icontouying</div>
</li>

<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#iconlifangti"></use>
Expand Down
20 changes: 16 additions & 4 deletions SuperMap iEarth/src/assets/icons/iconfont.css
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
@font-face {
font-family: "iconfont"; /* Project id 2397568 */
src: url('iconfont.woff2?t=1687940482534') format('woff2'),
url('iconfont.woff?t=1687940482534') format('woff'),
url('iconfont.ttf?t=1687940482534') format('truetype');
src: url('iconfont.woff2?t=1688638347789') format('woff2'),
url('iconfont.woff?t=1688638347789') format('woff'),
url('iconfont.ttf?t=1688638347789') format('truetype');
}

.iconfont {
font-family: "iconfont" !important;
font-size: 18px;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

.iconkongjianjuli:before {
content: "\e88c";
}

.iconyidijuli1:before {
content: "\e88e";
}

.icontouying:before {
content: "\e88d";
}

.iconlifangti:before {
content: "\e88b";
}
Expand Down
2 changes: 1 addition & 1 deletion SuperMap iEarth/src/assets/icons/iconfont.js

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions SuperMap iEarth/src/assets/icons/iconfont.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,27 @@
"css_prefix_text": "icon",
"description": "",
"glyphs": [
{
"icon_id": "36324060",
"name": "空间距离",
"font_class": "kongjianjuli",
"unicode": "e88c",
"unicode_decimal": 59532
},
{
"icon_id": "36322943",
"name": "依地距离",
"font_class": "yidijuli1",
"unicode": "e88e",
"unicode_decimal": 59534
},
{
"icon_id": "36322376",
"name": "投影",
"font_class": "touying",
"unicode": "e88d",
"unicode_decimal": 59533
},
{
"icon_id": "36192555",
"name": "立方体",
Expand Down
Binary file modified SuperMap iEarth/src/assets/icons/iconfont.ttf
Binary file not shown.
Binary file modified SuperMap iEarth/src/assets/icons/iconfont.woff
Binary file not shown.
Binary file modified SuperMap iEarth/src/assets/icons/iconfont.woff2
Binary file not shown.
4 changes: 2 additions & 2 deletions SuperMap iEarth/src/package/addData/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="add-data-box">
<div class="add-data-box" style="overflow-y:hidden">
<n-tabs type="line" animated justify-content="left">
<!-- 公共服务 -->
<n-tab-pane name="publicService" tab="公共服务">
Expand Down Expand Up @@ -37,7 +37,7 @@ import SmLayerTerrain from "./layer-terrain/index";
.add-data-box {
width: 100%;
height: 100%;
padding: 0 0.12rem;
padding: 0 0.01rem 0 0.12rem;
box-sizing: border-box;
overflow-y: scroll;
@include setsSrollbar();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
style="width: 2.4rem"
v-model:value="layerUrl"
type="text"
placeholder="http://www.supermapol.com/realspace/services/3D-CBD/rest/realspace/datas/Building@CBD/config"
@input="handleChange"
/>
</div>
Expand Down Expand Up @@ -69,7 +68,7 @@ let token = ref(false);
let layerToken = ref("");
let options = [
{
label: "图层",
label: "S3M",
value: "S3M",
},
{
Expand Down Expand Up @@ -153,6 +152,7 @@ function handleChange() {
}
}
// 添加s3m
let promiseArray: any[] = [];
function addS3M(s3mLayerUrl: string) {
let options: { name: string };
Expand All @@ -168,6 +168,7 @@ function addS3M(s3mLayerUrl: string) {
promiseWhen(promiseArray, true);
}
// 添加影像图层 - 目前只支持超图我们自己的影像
function addImage(imageryUrl: string) {
let layer = viewer.imageryLayers.addImageryProvider(
new SuperMap3D.SuperMapImageryProvider({
Expand All @@ -178,14 +179,18 @@ function addImage(imageryUrl: string) {
viewer.flyTo(layer);
}
// 添加地形
function addTerrain(terrainURL: string) {
// viewer.terrainProvider = new SuperMap3D.SuperMapTerrainProvider({
// url: terrainURL,
// isSct: true, //地形服务源自SuperMap iServer发布时需设置isSct为true
// isSct: true, //地形服务源自SuperMap iServer,本地发布时需设置isSct为true
// });
let isSctFlag = false;
if(terrainURL.indexOf("8090") != -1) isSctFlag = true;
viewer.terrainProvider = new SuperMap3D.SuperMapTerrainProvider({
url: terrainURL,
isSct: false,
isSct: isSctFlag,
});
layerStore.updateLayer({ type: "terrain" });
Expand Down
8 changes: 5 additions & 3 deletions SuperMap iEarth/src/package/addData/layer-service/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<!-- 公共服务 -->
<n-scrollbar style="max-height: 3.8rem">
<n-scrollbar style="max-height: 3.42rem">
<div class="layer-server-container">
<div
v-for="(item, index) in layerStore.layerServiceData.publicServiceList"
Expand All @@ -21,20 +21,21 @@
<script lang="ts" setup>
import { useMessage } from "naive-ui";
import { useLayerStore } from "@/store/layerStore";
import { usePanelStore } from "@/store";
import layerManagement from "@/tools/layerManagement";
// 弹窗提示
const message = useMessage();
const layerStore = useLayerStore();
const panelStore = usePanelStore();
// 添加公共服务:三类
function addPublicService(item: any) {
if (item.chooseType) {
message.warning("请勿重复添加!");
return;
}
console.log("item:",item);
// console.log("item:",item);
layerStore.SelectedOptions.publicService.push(item.name); // 存入已选择的公共服务选项
let type = item.type;
switch (type) {
Expand All @@ -51,6 +52,7 @@ function addPublicService(item: any) {
item.chooseType = true;
break;
}
panelStore.closeRightToolPanel(1);// 1为关闭左侧面板
}
</script>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<template>
<n-scrollbar style="max-height: 3rem">
<div class="row-item" style="margin-right: 0.1rem">
<!-- 剖面分析 -->
<span>起点经度</span>
Expand Down Expand Up @@ -91,7 +90,6 @@
</n-radio-group>
</div>
</div>
</n-scrollbar>
<div class="btn-row-item">
<n-button
type="info"
Expand Down
Loading

0 comments on commit e959a8e

Please sign in to comment.