alberto-acevedo / cesium-navigation Goto Github PK
View Code? Open in Web Editor NEWCesium plugin that adds to the Cesium map a compass, navigator (zoom in/out), and distance scale.
Cesium plugin that adds to the Cesium map a compass, navigator (zoom in/out), and distance scale.
Hi,alberto!
I'm a beginner.When useing the cesium-navigation,I have the following problems.Can you help me with it ,thanks.
1.When run the "npm install",it show following questions and how to upgrade the version.
High Code Injection
Package js-yaml
Patched in >=3.13.1
Dependency of node-minify [dev]
Path node-minify > crass > svgo > js-yaml
More info https://npmjs.com/advisories/813
2.When run the "node build.js",it show following questions and how to solve .
E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development>node build.js
Tracing dependencies for: almond
TypeError: Cannot read property 'contents' of undefined
In module tree:
viewerCesiumNavigationMixin
require-less/less
Error: TypeError: Cannot read property 'contents' of undefined
In module tree:
viewerCesiumNavigationMixin
require-less/less
at Object.parse (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\less\dist\less.cjs.js:6735:21)
at E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:28332:19
at E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:3059:39
at E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:2999:25
at Function.prim.nextTick (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:28083:9)
at Object.errback (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:2998:26)
at Object.callback (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:2984:23)
at Object.then (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:3038:23)
at build (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:28289:12)
at runBuild (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:30302:17)
at Object.execCb (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1946:33)
at Module.check (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1133:51)
at Module.<anonymous> (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1389:34)
at E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:384:23
at E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1439:21
at each (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:309:31)
at Module.emit (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1438:17)
at Module.check (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1188:30)
at Module.enable (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1426:22)
at Module.init (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1038:26)
at Module.<anonymous> (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1264:30)
at E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:384:23
at E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:2697:17
at Object.execCb (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1946:33)
at Module.check (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1133:51)
at Module.enable (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1426:22)
at Module.init (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1038:26)
at E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1710:36
at processTicksAndRejections (internal/process/task_queues.js:79:11) {
originalError: TypeError: Cannot read property 'contents' of undefined
at Object.parse (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\less\dist\less.cjs.js:6735:21)
at Object.lessAPI.load (eval at (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:27737:33), :103:12)
at Module. (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1345:28)
at E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:384:23
at on (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:767:21)
at Module.callPlugin (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1205:17)
at Module.moduleProto.callPlugin (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:27825:42)
at Module.fetch (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1074:46)
at Module.check (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1106:30)
at Module.enable (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1426:22)
at Module. (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1249:43)
at E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:384:23
at E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1439:21
at each (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:309:31)
at Module.emit (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1438:17)
at Module.check (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1188:30)
at Module.enable (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1426:22)
at Module.init (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1038:26)
at Module.moduleProto.init (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:27807:36)
at callGetModule (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1453:63)
at Object.completeLoad (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1840:21)
at E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:27756:41
at E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:3041:37
at E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:2989:25
at Function.prim.nextTick (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:28083:9)
at Object.callback (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:2988:26)
at Object.then (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:3038:23)
at Object.context.load (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:27735:28)
at Module.load (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1084:29)
at Module.fetch (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1074:66)
at Module.check (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1106:30)
at Module.enable (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1426:22)
at Object.enable (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1807:39)
at Object.context.enable (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:27620:38)
at Module.callPlugin (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1348:25)
at Module.moduleProto.callPlugin (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:27825:42)
at Module.fetch (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1074:46)
at Module.check (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1106:30)
at Module.enable (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1426:22)
at Object.enable (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1807:39)
at Object.context.enable (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:27620:38)
at Module. (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1411:33)
at E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:384:23
at each (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:309:31)
at Module.enable (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1363:17)
at Module.init (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1038:26)
at Module.moduleProto.init (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:27807:36)
at callGetModule (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1453:63)
at Object.completeLoad (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1840:21)
at E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:27756:41
at E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:3041:37
at E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:2989:25
at Function.prim.nextTick (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:28083:9)
at Object.callback (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:2988:26)
at Object.then (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:3038:23)
at Object.context.load (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:27735:28)
at Module.load (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1084:29)
at Module.fetch (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1074:66)
at Module.check (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1106:30)
at Module.enable (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1426:22)
at Object.enable (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1807:39)
at Object.context.enable (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:27620:38)
at Module. (E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:1411:33)
at E:\开发\WEBGIS\cesium-navigation\cesium-navigation-development\node_modules\requirejs\bin\r.js:384:23 {
moduleTree: [ 'require-less/less', 'viewerCesiumNavigationMixin' ],
fileName: 'E:/开发/WEBGIS/cesium-navigation/cesium-navigation-development/bower_components/require-less/less.js'
}
}
Is there a version for Angular 8+ or a way (walkthrough) how to integrate the existing library?
Hi,
Is there any coordinate control avalible for cesium viewer as we have navigation control? .i have seen such kind control in terriajs viewer.There control show lat,long and elevation on mouse move .
Thanks
Hello,
thanks for this great plugin. Could you be more visible and add your plugin in cesium plugin list ?
Hi there, is this package hosted anywhere so that it can be imported using a simple HTML script tag? I run into issues when I try to import it from https://larcius.github.io/cesium-navigation/dist/standalone/viewerCesiumNavigationMixin.min.js:
viewerCesiumNavigationMixin.min.js:11 Uncaught TypeError: defineProperties is not a function
at viewerCesiumNavigationMixin.min.js:11:3318
Thanks for the cool plugin. But can a use it with CesiumWidget out from box ? Or i must change it to use with CesiumWidget ?
When using the navigation mixin to zoom in, we are seeing a circle appear that expands and contracts if you use the mouse to move the globe view up or down.
This "breakout circle" appears like it is punching through the layers displayed on the screen.
I've drawn a red rectangle around the breakout circle in the attached image.
This breakout circle disappears when a user uses the mouse scroll wheel to zoom in/out.
This is the only version number that I could pull from the minified code...
Version: a.version = "3.4.0";
Gday,
Thanks for a great plugin, very handy indeed!
One thing I noticed in regards to the doco is that is says you can pass in an options object although nothing describes what options are.
In particular I was looking for options to allow me to turn various bits off (eg the zoom buttons).
Anyway just a suggestion :)
Thanks
Rowan
When in 2D or Columbus View zooming via the buttons does not work as expected.
Zooming in results in converging to a location and zoom level but on the one hand not the location where the view was centered and on the other hand sometimes it zooms out. So the final zoom level is not near to the ground.
In 2D view zooming out jumps between two locations while the zoom level remains.
In Columbus view zooming out jumps between several (maybe non-repeating) locations.
Any chance, the plugin will be uploaded as npm package?
What would be the best way to add this package to an webmodule based project?
This package doesn't seem to have anything like npm install cesium-navigation
and all of the versions of this available on npmjs are old.
您好,为什么我引入这个js文件报错呢??
报错:Uncaught ReferenceError: define is not defined at VM300680 viewerCesiumNavigationMixin.js:5:1
引入方式:
index.html
`
distance legend shows wrong values.
for example, when in columbus mode with a top down view rotation yields a change in the distance legend (with huge differences).
on the other hand in 2d mode there is no legend at all.
does it even make sense to offer this feature because when in columbus or 3d mode the distance varies a lot depending on the depth of the view.
the only reasonable solution would be to meassure the distance exactly at the place where the legend appears or to only show it when in top down view with small scale (because in large scales even in 2d the distances are varying a lot).
Hi,
I have seen that there is a coordinate control in terria.io library. is there any way to add similar controls to this library?
The API should exposed get and set properties for the setting of:
Hi,
Is there any way to change css style and position of the controls without changing them in the source?
In your Examples/standalone.html file you have the following tag in the html.
<script src="dist/standalone/viewerCesiumNavigationMixin.min.js"></script>This viewerCesiumNavigationMixin.min.js file is not in the zip file. Where is this coming from?
Thanks!
It will not work no matter what. Cesium work nice without the navigation but when I try to add the navigation it crushes.
Hello, your js does not seem to support cesium1.69 version
When I change my map to Cesium.SceneMode.SCENE2D the scale bar vanishes....
What is wrong?
Hi there!
I hope you qre doing greate guys! I am trying to install the Navegation plugin into my cesium 1.29 and I am getting the following error:
25951 error Windows_NT 10.0.10586
25952 error argv "C:\nodejs\node.exe" "C:\nodejs\node_modules\npm\bin\npm-cli.js" "install"
25953 error node v7.4.0
25954 error npm v4.0.5
25955 error code ELIFECYCLE
25956 error [email protected] postinstall: bower install
25956 error Exit status 1
25957 error Failed at the [email protected] postinstall script 'bower install'.
25957 error Make sure you have the latest version of node.js and npm installed.
25957 error If you do, this is most likely a problem with the cesium-navigation package,
25957 error not with npm itself.
25957 error Tell the author that this fails on your system:
25957 error bower install
25957 error You can get information on how to open an issue for this project with:
25957 error npm bugs cesium-navigation
25957 error Or if that isn't available, you can get their info via:
25957 error npm owner ls cesium-navigation
25957 error There is likely additional logging output above.
25958 verbose exit [ 1, true ]
Does anyone knows what¨s gong on here?
Regards!
Abel
I couldn't find it when reading the source code.
To be used as plugin, the styles like .modal and .modal-heading that are included in the standalone build should be removed.
The only styles included should only affect the plugin.
Would like to see an option such as screenSizeHide
that takes a string that is a pixel value, em, rem, etc. This would set the screen size at which the widget will hide. You could also set it to false
or an empty string and have it always display at any screen size
When the map turns the scale value changes to some unrealistic value.
After setting an entity as tracked, with the camera button in the top left of the infobox, subsequent clicks of the + or - zoom buttons go out to a whole-world view.
Zooming in from that view with the + button is even odder, I tend to end up in Antarctica! Maybe that's a clue ?
The plugin was implemented to work for Cesium. Remove all dependencies to Leaflet.
Hi,
I want to place navigation tool on left side of cesium globe how can achive this task?waiting for your reply
Thanks
控件在浏览器窗口化缩小到一定程度就隐藏不显示,请问下怎么控制无论怎么缩放都一直显示控件。
Hi!
As soon i put this code in my CesiumCiewer:
var cesiumViewer = new Cesium.Viewer('cesiumContainer');
cesiumViewer.extend(Cesium.viewerCesiumNavigationMixin, {});
Then I was unable to see any modell and the whole configuration of my .js container doesn't apply..
The navegations tool works fine but why everything else is missing? for example I am no able anymore to control the visibility of the Cesium bottoms, for example these doesn't work:
var cesiumViewer = new Cesium.Viewer('cesiumContainer');
cesiumViewer.extend(Cesium.viewerCesiumNavigationMixin, {});
geocoder: false,
navigationHelpButton: true,
sceneModePicker: true,
infoBox : false,
selectionIndicator : true,
baseLayerPicker: true,
shadows: true,
vrButton : false,
homeButton: true,
timeline: false,
animation: false,
});
Thanks for your help!
Abel
I have installed npm ,nodejs and configured them,but when I use the command "node building.js", I get the response below:
fs.js:839
return binding.lstat(pathModule._makeLong(path));
Error:ENOENT:no such file or directory,lstat'C:\Users|Administrator\Source'
at Error(native)
at Object.fs.lstatSync(fs.js:839:18)
................................
.............................
at Module.load(module.js:343:32)
at Function.Module._load(module.js:300:12)
at Function.Module.runMain(module.js:441:10)
please replace
.markdown u, a : hover {
text - decoration : underline
}
to
.markdown u, .markdown a : hover {
text - decoration : underline
}
ohterwise it replace for all a
I love this plugin. I have been using the standalone version with Cesium in a desktop application and it works great. I'm currently developing a web app which is built using Webpack (including Cesium). I can't quite figure out how to integrate this plugin or if it is possible.
Has anyone successfully loaded with Webpack?
Hi !
First of all thank you a very nice free tool for Cesium. I am trying to re-stylle Cesium and I will need to change position and re-stylle the Navegator. I wonder where to find the .CSS or other stylle document for these task?
Regards,
Abel Gonzalez
If there is a terrain Model loaded, then the scale for zoom in and zoomout is too big. So if i click on zoomIn it will send me directly to the ground of the terrain and it is at this time not really movable.
So it would be nice to set the zoom scale - i think it use 2.0 / 3.0 - or to calculate it depending on the used elevation model.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.