Coder Social home page Coder Social logo

richard1015 / cesium-navigation-es6 Goto Github PK

View Code? Open in Web Editor NEW
130.0 130.0 65.0 374 KB

仓库已迁移https://github.com/cesium-plugin/cesium-navigation-es6

Home Page: https://richard1015.github.io/cesium/

License: MIT License

JavaScript 55.82% CSS 18.29% HTML 2.58% Less 23.31%

cesium-navigation-es6's People

Contributors

richard1015 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cesium-navigation-es6's Issues

依赖包引用问题

  • cesium/Source/Cesium.js in ./node_modules/cesium-navigation-es6/viewerCesiumNavigationMixin.js, ./node_modules/cesium-navigation-es6/core/registerKnockoutBindings.js and 1 other

该段提示即安装依赖后出现的问题,原因是无法在当前依赖包文件中找到对应的文件【cesium/Source/Cesium.js】
按理来说即使无法在本依赖文件中找不到也会往上一级一级的查找,此问题让本人百思不得其解,往看到此问题后能及时回复

Use with typescript

When I try to use this in my typescript project, I get the error:

Cannot find module 'cesium-navigation-es6' or its corresponding type declarations.
    34 | } from "cesium";
    35 | 
  > 36 | import { CesiumNavigation } from "cesium-navigation-es6"

How can I use this module with typescript?

Vue项目中无法使用

你好,我在Vue.js项目中安装的cesium 1.69,导航插件使用的最新版,在vue模板中使用时报错:

This dependency was not found:

* cesium in ./node_modules/cesium-navigation-es6/viewerCesiumNavigationMixin.js, ./node_modules/cesium-navigation-es6/CesiumNavigation.js and 9 others

To install it, you can run: npm install --save cesium

CesiumViewer.vue模板内容如下:

<template>
  <el-container style="height: 100%">
    <el-main style="padding: 0px;height:94%;">
      <div id="cesiumContainer"></div>
    </el-main>
  </el-container>
</template>
<script>
import * as Cesium from 'cesium/Cesium'
import CesiumNavigation from 'cesium-navigation-es6'

export default{
  name: 'cesiumContainer',
  data () {
    return {
      dialogVisible: false,
      viewer: null,
      cartesian: null,
    }
  },
  mounted () {
    var me = this
    me.viewer = new Cesium.Viewer('cesiumContainer')
   var options = {}
    options.defaultResetView = Cesium.Rectangle.fromDegrees(80, 22, 130, 50)
    options.enableCompass = true
    options.enableZoomControls = true
    options.enableDistanceLegend = true
    options.enableCompassOuterRing = true

    CesiumNavigation(me.viewer, options)
  }
}
</script>

请问该怎么办呢?

npm中cesium版本升级

你好,现在cesium版本是1.71.0,npm中cesium-navigation-es6包最新1.1.6,它package中使用的cesium是1.6.4,如果项目使用cesium版本是1.71.0,就无法使用cesium-navigation-es6包(除非手动改这个包的代码),npm中可以更新一下吗?使得cesium版本一致,非常感谢!

微信反馈群,方便及时响应

微信交流群

由于邮件过多,来不及看,大家可以加群方便及时响应

请添加微信号: zpc1305780485 备注 申请加群 cesium-navigation-es6

🎉🎉欢迎大家使用 cesium-navigation-es6 库~ 🎉🎉

如果您在使用过程中遇到什么问题可通过 Issues 或邮件 [email protected] 联系我们。

您的支持是我开发的动力。

欢迎Star,欢迎PR~

好像不支持babel7

老大,webpack4+babel7 下打包出错 ,有办法解决么?


 ERROR  Failed to compile with 11 errors                                                                                                                                                              11:04:15

This dependency was not found:

* cesium/Source/Cesium.js in ./node_modules/cesium-navigation-es6/viewerCesiumNavigationMixin.js, ./node_modules/cesium-navigation-es6/CesiumNavigation.js and 9 others

To install it, you can run: npm install --save cesium/Source/Cesium.js

package.json内容如下:

{
  "name": "cesium_vue",
  "version": "1.0.0",
  "description": "A Vue.js project",
  "author": "Dicky",
  "private": true,
  "scripts": {
    "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
    "start": "npm run dev",
    "unit": "jest --config test/unit/jest.conf.js --coverage",
    "e2e": "node test/e2e/runner.js",
    "test": "npm run unit && npm run e2e",
    "lint": "eslint --ext .js,.vue src test/unit test/e2e/specs",
    "build": "node build/build.js"
  },
  "dependencies": {
    "axios": "^0.19.2",
    "cesium": "^1.69.0",
    "cesium-navigation-es6": "^1.1.5",
    "cesium-print": "^1.0.6",
    "element-ui": "^2.13.1",
    "font-awesome": "^4.7.0",
    "sass-loader": "^8.0.2",
    "vue": "^2.5.2",
    "vue-router": "^3.0.1"
  },
  "devDependencies": {
    "@babel/core": "^7.0.0",
    "@babel/plugin-proposal-class-properties": "^7.0.0",
    "@babel/plugin-proposal-decorators": "^7.0.0",
    "@babel/plugin-proposal-export-namespace-from": "^7.0.0",
    "@babel/plugin-proposal-function-sent": "^7.0.0",
    "@babel/plugin-proposal-json-strings": "^7.0.0",
    "@babel/plugin-proposal-numeric-separator": "^7.0.0",
    "@babel/plugin-proposal-throw-expressions": "^7.0.0",
    "@babel/plugin-syntax-dynamic-import": "^7.0.0",
    "@babel/plugin-syntax-import-meta": "^7.0.0",
    "@babel/plugin-syntax-jsx": "^7.0.0",
    "@babel/plugin-transform-modules-commonjs": "^7.0.0",
    "@babel/plugin-transform-runtime": "^7.0.0",
    "@babel/preset-env": "^7.0.0",
    "@babel/register": "^7.0.0",
    "@babel/runtime-corejs2": "^7.9.6",
    "autoprefixer": "^7.1.2",
    "babel-core": "^7.0.0-bridge.0",
    "babel-eslint": "^9.0.0",
    "babel-helper-vue-jsx-merge-props": "^2.0.3",
    "babel-jest": "^23.4.2",
    "babel-loader": "^8.1.0",
    "babel-plugin-dynamic-import-node": "^1.2.0",
    "babel-plugin-transform-vue-jsx": "^3.5.0",
    "chalk": "^2.0.1",
    "chromedriver": "^2.27.2",
    "copy-webpack-plugin": "^4.0.1",
    "cross-spawn": "^5.0.1",
    "css-loader": "^3.5.3",
    "eslint": "^4.15.0",
    "eslint-config-standard": "^10.2.1",
    "eslint-friendly-formatter": "^3.0.0",
    "eslint-loader": "^4.0.2",
    "eslint-plugin-import": "^2.7.0",
    "eslint-plugin-node": "^5.2.0",
    "eslint-plugin-promise": "^3.4.0",
    "eslint-plugin-standard": "^3.0.1",
    "eslint-plugin-vue": "^6.2.2",
    "file-loader": "^6.0.0",
    "friendly-errors-webpack-plugin": "^1.7.0",
    "html-webpack-plugin": "^4.3.0",
    "jest": "^22.0.4",
    "jest-serializer-vue": "^0.3.0",
    "js-cookie": "^2.2.1",
    "mini-css-extract-plugin": "^0.9.0",
    "nightwatch": "^0.9.12",
    "node-notifier": "^5.1.2",
    "optimize-css-assets-webpack-plugin": "^5.0.3",
    "ora": "^1.2.0",
    "portfinder": "^1.0.13",
    "postcss-import": "^11.0.0",
    "postcss-loader": "^2.0.8",
    "postcss-url": "^7.2.1",
    "rimraf": "^2.6.0",
    "selenium-server": "^3.0.1",
    "semver": "^5.3.0",
    "shelljs": "^0.7.6",
    "uglifyjs-webpack-plugin": "^1.1.1",
    "url-loader": "^4.1.0",
    "vue-jest": "^1.0.2",
    "vue-loader": "^15.9.1",
    "vue-style-loader": "^3.0.1",
    "vue-template-compiler": "^2.5.2",
    "webpack": "^4.43.0",
    "webpack-bundle-analyzer": "^2.9.0",
    "webpack-cli": "^3.3.11",
    "webpack-dev-server": "^3.10.3",
    "webpack-merge": "^4.1.0"
  },
  "engines": {
    "node": ">= 6.0.0",
    "npm": ">= 3.0.0"
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not ie <= 8"
  ]
}

大佬,在cesium1.72中使用这个插件出现问题

我是vue+cesium1.72.0进行开发,当我引入大佬你写的这个插件的时候,出现如下错误:

./node_modules/cesium-navigation-es6/CesiumNavigation.js
Module not found: Error: Can't resolve 'cesium/Source/Cesium.js' in '/Users/adsionli/code/vue-cesium-test/node_modules/cesium-navigation-es6'

在main.js下,我是这样写的

import CesiumNavigation from 'cesium-navigation-es6'
Vue.prototype.CesiumNavigation = CesiumNavigation

一个错误

你好:
当前在项目中引用cesium-navigation-es6时,发生以下错误:
捕获
我不知道怎么解决,麻烦您,帮忙看下,谢谢!

样式问题

请教一下,指北针的 N的样式,可以修改吗?options没有找到文档

Uncaught Error: Cannot find module 'entities/maps/entities.json'

./node_modules/cesium-navigation-es6/node_modules/entities/maps/entities.json
Module parse failed: Unexpected token e in JSON at position 0 while parsing near 'export default "data...'
File was processed with these loaders:

  • ./node_modules/url-loader/dist/cjs.js
    You may need an additional loader to handle the result of these loaders.
    SyntaxError: Unexpected token e in JSON at position 0 while parsing near 'export default "data...'
    at JSON.parse ()
    at parseJson (E:\docker\nginx\html\Ten3D\node_modules\json-parse-better-errors\index.js:7:17)
    at JsonParser.parse (E:\docker\nginx\html\Ten3D\node_modules\webpack\lib\JsonParser.js:16:16)
    at doBuild.err (E:\docker\nginx\html\Ten3D\node_modules\webpack\lib\NormalModule.js:482:32)
    at runLoaders (E:\docker\nginx\html\Ten3D\node_modules\webpack\lib\NormalModule.js:358:12)
    at E:\docker\nginx\html\Ten3D\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (E:\docker\nginx\html\Ten3D\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at iterateNormalLoaders (E:\docker\nginx\html\Ten3D\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
    at E:\docker\nginx\html\Ten3D\node_modules\loader-runner\lib\LoaderRunner.js:236:3
    at runSyncOrAsync (E:\docker\nginx\html\Ten3D\node_modules\loader-runner\lib\LoaderRunner.js:130:11)
    at iterateNormalLoaders (E:\docker\nginx\html\Ten3D\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
    at Array. (E:\docker\nginx\html\Ten3D\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (E:\docker\nginx\html\Ten3D\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
    at provider (E:\docker\nginx\html\Ten3D\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9)
    at E:\docker\nginx\html\Ten3D\node_modules\graceful-fs\graceful-fs.js:115:16
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
    errors @ client:159
    (anonymous) @ socket.js:47
    sock.onmessage @ SockJSClient.js:63
    EventTarget.dispatchEvent @ sockjs.js:170
    (anonymous) @ sockjs.js:888
    SockJS._transportMessage @ sockjs.js:886
    EventEmitter.emit @ sockjs.js:86
    WebSocketTransport.ws.onmessage @ sockjs.js:2962

style problem

Environment

react、cesium1.60

Situation

After add import CesiumNavigation from "cesium-navigation-es6";
then add

var options = {};
// 用于在使用重置导航重置地图视图时设置默认视图控制。接受的值是Cesium.Cartographic 和 Cesium.Rectangle.
options.defaultResetView = Cesium.Rectangle.fromDegrees(80, 22, 130, 50);
// 用于启用或禁用罗盘。true是启用罗盘,false是禁用罗盘。默认值为true。如果将选项设置为false,则罗盘将不会添加到地图中。
options.enableCompass= true;
// 用于启用或禁用缩放控件。true是启用,false是禁用。默认值为true。如果将选项设置为false,则缩放控件将不会添加到地图中。
options.enableZoomControls= false;
// 用于启用或禁用距离图例。true是启用,false是禁用。默认值为true。如果将选项设置为false,距离图例将不会添加到地图中。
options.enableDistanceLegend= false;
// 用于启用或禁用指南针外环。true是启用,false是禁用。默认值为true。如果将选项设置为false,则该环将可见但无效。
options.enableCompassOuterRing= true;
CesiumNavigation(viewer, options);

Howerver I can't move and zoom .

resultPic
my react can‘t eject so does't support less. Is that the reason?

cesium-navigation-es6参数控制

一直以来都在使用cesium-navigation-es6,想提一下建议,能否让enableCompass、enableZoomControls、enableDistanceLegend、enableCompassOuterRing这几个控制参数可以在初始化指北针对象之后,能以成员参数的形式进行控制?

使用defaultResetView,自定义**范围却显示到0,0坐标

代码两个都是定位到0,0,不能定位到下面坐标点的范围
options.defaultResetView = new Cesium.Cartographic.fromDegrees(117.704, 38.34, 9000)
// options.defaultResetView = Cesium.Rectangle.fromDegrees(80, 22, 130, 50)
但是我直接使用
this.camera.flyTo({
destination: this.scene.globe.ellipsoid.cartographicToCartesian(new Cesium.Cartographic.fromDegrees(117.704, 38.34, 9000)),
})
视图时可以跳到指定位置

After the plug-in was introduced--ERROR in ./node_modules/cesium/Source/Core/Resource.js

The error statement:
var http = URL.protocol === "https:" ? require("https") : require("http");
var zlib = require("zlib");

ERROR in ./node_modules/zlib/lib/zlib.js
Module not found: Error: Can't resolve './zlib_bindings' in 'D:\Project\Cesium\scAPPFronted-Navigation\node_modules\zlib\lib'
ERROR in ./node_modules/cesium/Source/Core/Resource.js
Module not found: Error: Can't resolve 'http' in 'D:\Project\Cesium\scAPPFronted-Navigation\node_modules\cesium\Source\Core'
ERROR in ./node_modules/cesium/Source/Core/Resource.js
Module not found: Error: Can't resolve 'https' in 'D:\Project\Cesium\scAPPFronted-Navigation\node_modules\cesium\Source\Core'

Otherwise, my cesium project is build in angular

升级到最新版本时,运行服务出现找不到对应依赖:cesium/Source/Cesium.js

Cesium版本为:1.50

"cesium": "^1.50.0", "cesium-navigation-es6": "^1.1.6",

ERROR Failed to compile with 11 errors 11:04:53 AM
This dependency was not found:

  • cesium/Source/Cesium.js in ./node_modules/cesium-navigation-es6/viewerCesiumNavigationMixin.js, ./node_modules/cesium-navigation-es6/CesiumNavigation.js and 9 others

To install it, you can run: npm install --save cesium/Source/Cesium.js

ERROR CODE ERR_WEBPACK_MODULE_NOT_FOUND

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.