npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mars3d-supermap

v3.5.18

Published

Mars3D平台插件,结合supermap超图库使用的功能插件

Downloads

230

Readme

Mars3D平台插件, 结合supermap超图库使用的功能插件

使用方式

使用 Node 环境下的现代 web 前端技术栈时,可以使用 npm 或 cnpm 或 yarn 等方式来安装 mars3d 插件包

//安装mars3d主库
npm install mars3d --save

//安装mars3d插件(按需安装)
npm install mars3d-supermap --save

安装后在mars3d引入后,引入一次插件即可

//导入mars3d主库
import "mars3d/dist/mars3d.css";
import * as mars3d from "mars3d";

//导入mars3d插件 [在mars3d引入后]
import "mars3d-supermap";

关于引入后的具体如何使用,请参考教程在项目中集成 Mars3D中了解更多信息。

mars3d与超图的融合有2个方式

方式1:原生Cesium库+s3m插件

mars3d(含Cesium) + s3m独立插件 + mars3d-supermap,需要引入的资源为:

"mars3d": [
  "Cesium/Widgets/widgets.css", //原生Cesium
  "Cesium/Cesium.js",
  "turf/turf.min.js",
  "mars3d/mars3d.css", //mars3d
  "mars3d/mars3d.js",
  "mars3d/plugins/supermap/SuperMap3D.js", //s3m支持原生cesium的独立插件,参考 https://github.com/SuperMap/iClient3D-for-WebGL
  "mars3d/plugins/supermap/mars3d-supermap.js",//mars3d-supermap简化调用封装
],

更多参考mars3d功能示例中S3M图层示例

此方式的特别说明

经过测试,SuperMap3D插件代码不是最新的,超图官网API很多在此插件中都没有。

方式2:需要替换Cesium库

超图版本Cesium + mars3d + mars3d-supermap ,需要引入的资源为:

"mars3d": [
  "Cesium-supermap/Widgets/widgets.css", //超图版本Cesium 
  "Cesium-supermap/Cesium.js",
  "mars3d/plugins/compatible/cesium-version.js", //cesium版本兼容处理
  "turf/turf.min.js",
  "mars3d/mars3d.css", //mars3d
  "mars3d/mars3d.js",
  "mars3d/plugins/supermap/mars3d-supermap.js",//mars3d-supermap简化调用封装
],

相关示例和项目可以访问:https://github.com/marsgis/mars3d-link-supermap

此方式的特别说明

不是所有功能都可以正常用,因为:

  • 使用的是超图版Cesium,所以mars3d-cesium的所有修改都无效,影响到wfs、模型编辑、地形编辑等功能(可以用超图的相关API来替代实现)
  • 超图Cesium修改了地球的默认参数,造成3dtiles加载位置偏差很大。

相关依赖

超图版Cesium、mars3d、

Mars3D 是什么

Mars3D三维地球平台软件火星科技研发的一款基于 WebGL 技术实现的三维客户端开发平台,基于Cesium优化提升与B/S架构设计,支持多行业扩展的轻量级高效能GIS开发平台,能够免安装、无插件地在浏览器中高效运行,并可快速接入与使用多种GIS数据和三维模型,呈现三维空间的可视化,完成平台在不同行业的灵活应用。

Mars3D平台可用于构建无插件、跨操作系统、 跨浏览器的三维 GIS 应用程序。平台使用 WebGL 来进行硬件加速图形化,跨平台、跨浏览器来实现真正的动态大数据三维可视化。通过 Mars3D产品可快速实现浏览器和移动端上美观、流畅的三维地图呈现与空间分析。

相关网站