@kfgis/mpd-common
v1.1.0
Published
mpd_sdk相关的依赖包,包括cesium,supercluster
Readme
MPD-SDK-COMMON
mpd_sdk相关的依赖包,包括cesium,supercluster
Installation
yarn add @kfgis/mpd-sdk
-------------------------
npm install @kfgis/mpd-sdkimport * as MPD from '@kfgis/mpd-sdk'
import '@kfgis/mpd-sdk/dist/mpd.min.css'CDN
<script src="https://cdn.jsdelivr.net/npm/@kfgis/mpd-sdk/dist/mpd.min.js"></script>
<link
href="https://cdn.jsdelivr.net/npm/@kfgis/mpd-sdk/dist/mpd.min.css"
rel="stylesheet"
type="text/css"
/>Please put the resources in the project root directory libs/mpd-sdk, if you put it in other directory, the framework will not run properly.Configuration
The configuration is mainly used in the
NPM / YARNway
Since the MPD framework sets CESIUM_BASE_URL to ./libs/mpd-sdk/resources/ , you need to copy Cesium related
static resources files: Assets , Workers , ThirdParty to libs/mpd-sdk/resources directory of the project to
ensure that the 3D scene can be rendered properly. You can also use MPD.config.baseUrl to set the static resource base
related to Cesium .
vite
// vite.config.js
import { defineConfig } from 'vite'
import MPD from '@kfgis/vite-plugin-mpd'
export default defineConfig({
plugins: [MPD()],
})Start
MPD.ready({}).then(() => {
let viewer = new MPD.Viewer()
})