| @@ -3,9 +3,12 @@ | |||
| "colors": true, | |||
| "header-increment": false, | |||
| "line-length": false, | |||
| "no-trailing-punctuation": {"punctuation": ".,;:"}, | |||
| "no-trailing-punctuation": { | |||
| "punctuation": ".,;:" | |||
| }, | |||
| "no-duplicate-header": false, | |||
| "no-inline-html": false, | |||
| "no-hard-tabs": false, | |||
| "whitespace": false | |||
| } | |||
| "whitespace": false, | |||
| "link-fragments": false | |||
| } | |||
| @@ -474,8 +474,8 @@ tc.addTrack(track) | |||
| "clampToTileset": false, // 是否贴物 | |||
| "interpolationType": "Linear", // 插值类型:Linear、Hermite、Lagrange | |||
| "interpolationDegree": 2, // 插值度数 | |||
| "endDelayTime": 0.5,// 结束时间延长时间,单位:秒, | |||
| "headingOffset":0,//旋转偏移 | |||
| "endDelayTime": 0.5, // 结束时间延长时间,单位:秒, | |||
| "headingOffset": 0 //旋转偏移 | |||
| } | |||
| ``` | |||
| @@ -245,8 +245,6 @@ effect.silhouette.enable = true | |||
| - `{Number} length`:长度 | |||
| - `{Array} selected`:设置后期作用的覆盖物 | |||
| ## DC.CircleScan | |||
| > 扫描圈,继承于[Animation](#animation) | |||
| @@ -279,7 +277,6 @@ circleScan.start() | |||
| } | |||
| ``` | |||
| ## DC.RadarScan | |||
| > 雷达扫描,继承于[Animation](#animation) | |||
| @@ -5,8 +5,9 @@ | |||
| > 框架主入口函数,使用框架时必须以其开始,否则使用框架 | |||
| ```js | |||
| DC.ready({}).then(()=>{}) | |||
| DC.ready({}).then(() => {}) | |||
| ``` | |||
| - 参数 | |||
| - `{Object} config`:配置参数 | |||
| - 返回值 `Promise` | |||
| @@ -14,9 +15,9 @@ DC.ready({}).then(()=>{}) | |||
| ```json | |||
| //属性参数(可选) | |||
| { | |||
| "Cesium": '<自定义的Cesium库,如果未设置,将使用框架内部默认Cesium框架>', | |||
| "echarts": '<echarts库,设置后将加载echarts图层>', | |||
| "baseUrl": '<Cesium 静态资源路径,默认值为:“./libs/dc-sdk/resources/” >' | |||
| "Cesium": "<自定义的Cesium库,如果未设置,将使用框架内部默认Cesium框架>", | |||
| "echarts": "<echarts库,设置后将加载echarts图层>", | |||
| "baseUrl": "<Cesium 静态资源路径,默认值为:“./libs/dc-sdk/resources/” >" | |||
| } | |||
| ``` | |||
| @@ -25,9 +26,10 @@ DC.ready({}).then(()=>{}) | |||
| > 框架中注册第三放框架包, | |||
| ```js | |||
| DC.registerLib("turf",turf) | |||
| console.log(DC.__namspace.turf) | |||
| DC.registerLib('turf', turf) | |||
| console.log(DC.__namespace.turf) | |||
| ``` | |||
| - 参数 | |||
| - `{String} name`:名称 | |||
| - `{Object} lib`: 库模块 | |||
| @@ -37,8 +39,9 @@ console.log(DC.__namspace.turf) | |||
| > 获取框架中注册的第三方框架包, | |||
| ```js | |||
| let turf = DC.getLib("turf") | |||
| let turf = DC.getLib('turf') | |||
| ``` | |||
| - 参数 | |||
| - `{String} name`:名称 | |||
| - 返回值 `Object` | |||
| @@ -563,7 +563,7 @@ let layer = new DC.GpxLayer('id', '**/**.gpx') | |||
| ### example | |||
| ```js | |||
| let layer = new DC.ClusterLayer('id',{image:''}) | |||
| let layer = new DC.ClusterLayer('id', { image: '' }) | |||
| viewer.addLayer(layer) | |||
| ``` | |||
| @@ -375,7 +375,7 @@ billboard.size = [20, 20] | |||
| - 参数 | |||
| - `{Object} entity`:Cesium 覆盖物 | |||
| - 返回值 `billbard` | |||
| - 返回值 `billboard` | |||
| ## DC.Label | |||
| @@ -832,7 +832,7 @@ let divIcon = new DC.DivIcon(position, '<div></div>') | |||
| ### properties | |||
| - `{Position|String|Array} position`:坐标 | |||
| - `{String|Element} content`:内容 **_`writeonly`_** | |||
| - `{String|Element} content`:内容 **_`writeOnly`_** | |||
| ### methods | |||
| @@ -926,10 +926,6 @@ let box = new DC.Box(position, 20, 30, 40) | |||
| } | |||
| ``` | |||
| ## DC.Corridor | |||
| > 走廊要素,继承于[Overlay](#overlay) | |||
| @@ -1123,10 +1119,10 @@ let ellipse = new DC.Ellipse(position, 20, 30) | |||
| ### example | |||
| ```js | |||
| let position = new DC.Position(120, 20) | |||
| let ellipsoid = new DC.Ellipsoid(position, { x: 30, y: 30, z: 30 }) | |||
| ``` | |||
| ```js | |||
| let position = new DC.Position(120, 20) | |||
| let ellipsoid = new DC.Ellipsoid(position, { x: 30, y: 30, z: 30 }) | |||
| ``` | |||
| ### creation | |||
| @@ -153,7 +153,7 @@ viewer.addBaseLayer(baseLayer, { | |||
| //属性参数(可选) | |||
| { | |||
| "url": "", //地址:arcgis/wmts/xyx/single 有效 | |||
| "style": "img", //样式:img、elec、ter。百度:normal、middlenight、dark,腾讯:img,1、4 | |||
| "style": "img", //样式:img、elec、ter。百度:normal,dark,腾讯:img,1、4 | |||
| "key": "", //认证,仅天地图有效 | |||
| "subdomains": [], | |||
| "crs":"WGS84",// 坐标系: WGS84 、BD09 、GCJ02,仅百度、高德有效 | |||
| @@ -18,4 +18,4 @@ import '@dvgis/dc-sdk/dist/dc.min.css' | |||
| ```js | |||
| // DC.ready(initViewer) | |||
| DC.ready().then(initViewer) | |||
| ``` | |||
| ``` | |||
| @@ -13,8 +13,8 @@ npm install @dvgis/dc-sdk | |||
| ``` | |||
| ```js | |||
| import * as DC from '@dvgis/dc-sdk' | |||
| import '@dvgis/dc-sdk/dist/dc.core.min.css' | |||
| import * as DC from '@dvgis/dc-sdk' | |||
| import '@dvgis/dc-sdk/dist/dc.core.min.css' | |||
| ``` | |||
| `CDN` | |||
| @@ -56,7 +56,7 @@ DC.ready().then(() => { | |||
| ## 应用配置 | |||
| 由于 DC 框架将Cesium静态资源默认路径设置为 `./libs/dc-sdk/resources/`,这样需将 `Cesium` 相关的静态资源文件: `Assets`、`Workers` 、`ThirdParty` 复制到工程的 `libs/dc-sdk/resources` 目录下以保证三维场景能够正常呈现,也可通过全局函数进行 `Cesium` 相关的静态资源路基设置 | |||
| 由于 DC 框架将 Cesium 静态资源默认路径设置为 `./libs/dc-sdk/resources/`,这样需将 `Cesium` 相关的静态资源文件: `Assets`、`Workers` 、`ThirdParty` 复制到工程的 `libs/dc-sdk/resources` 目录下以保证三维场景能够正常呈现,也可通过全局函数进行 `Cesium` 相关的静态资源路基设置 | |||
| > `npm / yarn / pnpm` | |||
| @@ -66,7 +66,7 @@ DC.ready().then(() => { | |||
| // webpack.config.js | |||
| const path = require('path') | |||
| const CopywebpackPlugin = require('copy-webpack-plugin') | |||
| const CopyWebpackPlugin = require('copy-webpack-plugin') | |||
| const dvgisDist = './node_modules/@dvgis' | |||
| module.exports = { | |||
| @@ -87,13 +87,13 @@ module.exports = { | |||
| // vue.config.js | |||
| const path = require('path') | |||
| const CopywebpackPlugin = require('copy-webpack-plugin') | |||
| const CopyWebpackPlugin = require('copy-webpack-plugin') | |||
| const dvgisDist = './node_modules/@dvgis' | |||
| module.exports = { | |||
| // 其他配置 | |||
| chainWebpack: (config) => { | |||
| config.plugin('copy').use(CopywebpackPlugin, [ | |||
| config.plugin('copy').use(CopyWebpackPlugin, [ | |||
| [ | |||
| { | |||
| from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | |||
| @@ -111,13 +111,13 @@ module.exports = { | |||
| // vue.config.js | |||
| const path = require('path') | |||
| const CopywebpackPlugin = require('copy-webpack-plugin') | |||
| const CopyWebpackPlugin = require('copy-webpack-plugin') | |||
| const dvgisDist = './node_modules/@dvgis' | |||
| module.exports = { | |||
| // 其他配置 | |||
| chainWebpack: (config) => { | |||
| config.plugin('copy').use(CopywebpackPlugin, [ | |||
| config.plugin('copy').use(CopyWebpackPlugin, [ | |||
| { | |||
| patterns: [ | |||
| { | |||
| @@ -141,11 +141,11 @@ npm install @dvgis/vite-plugin-dc | |||
| ```js | |||
| // vite.config.js | |||
| import { defineConfig } from "vite"; | |||
| import DC from "@dvgis/vite-plugin-dc"; | |||
| import { defineConfig } from 'vite' | |||
| import DC from '@dvgis/vite-plugin-dc' | |||
| export default defineConfig({ | |||
| plugins: [DC()], | |||
| }); | |||
| }) | |||
| ``` | |||
| `CDN` | |||
| @@ -10,7 +10,7 @@ hero: | |||
| - theme: brand | |||
| text: 快速开始 | |||
| link: /zh/guide/introduction | |||
| features: | |||
| features: | |||
| - title: 简单 | |||
| details: 仅仅一个div和几行代码就能构建一个三维WebGis应用 | |||
| - title: 易用 | |||