Giter VIP home page Giter VIP logo

webworldwind's Introduction

Web WorldWind

Web WorldWind 0.11.0 is now available on GitHub. The summary of changes is as follows:

  • Improvements to COLLADA 3D model support.
    • Added ability to obtain locations of a click in a 3D model.
    • Added visualization support to COLLADA models with wrongly formatted normals.
  • Transparent placemark picking has been fixed.
  • Improvements to Well-Known Text format support.
  • Various fixes to example code files.

Development environment changes:

  • Added Chrome and Firefox headless browsers and removed PhantomJS.
  • Switched IDEs from WebStorm to Visual Studio Code.
  • Updated development dependencies to latest versions.

WorldWind's API remains largely unchanged in this release and we are committed to maintaining a consistent API in future releases.

For additional information, please refer to the releases list. Please direct any questions to our email address: [email protected].


Web WorldWind is a 3D planetary globe engine built in JavaScript for the web, developed by NASA. The European Space Agency has provided valuable contributions to this platform since 2015. Web WorldWind provides a geographic context complete with terrain, and a collection for shapes for displaying and interacting with geographic or geo-located information in 3D and 2D in any modern web browser. High-resolution terrain and imagery is retrieved from remote servers automatically as needed, while enabling developers to include their own custom terrain, imagery, 3D shapes, and position markings.

The project's website, worldwind.arc.nasa.gov has setup instructions, developer guides, API documentation and more.

Get Started

The Web WorldWind Developer's Guide has a complete description of Web WorldWind's functionality. In there, you will find many Web WorldWind resources, including a user guide and documentation for every module file. For complete beginners on WorldWind, the Get Started tutorial is the place to go.

The latest Web WorldWind release provides many simple examples showing how to use most of Web WorldWind's functionality, as well as more involved small applications for reference on how to use Web WorldWind in domain-focused GIS development.

Building

Build Status

Install NodeJS. The build is known to work with Node.js 12.18.0 LTS.

  • npm install downloads WorldWind's dependencies and builds everything

  • npm run build builds everything

  • npm run doc generates the WorldWind API documentation

  • npm run test runs WorldWind's unit tests

  • npm run test:watch automatically runs WorldWind's unit tests when source code changes

License

Copyright 2003-2006, 2009, 2017, 2020, 2022 United States Government, as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved.

The NASAWorldWind/WebWorldWind platform is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

NASAWorldWind/WebWorldWind also contains the following 3rd party Open Source software:

  • ES6-Promise – under MIT License
  • libtess.js – SGI Free Software License B
  • Proj4 – under MIT License
  • JSZip – under MIT License

A complete listing of 3rd Party software notices and licenses included in WebWorldWind can be found in the Web WorldWind 3rd-party notices and licenses PDF file found in its code directory.

webworldwind's People

Contributors

akelux avatar balhar-jakub avatar beak-man avatar carla-orru avatar claudiaifrim avatar eirizarry avatar emxsys avatar gabrieleprestifilippo avatar markpet49 avatar nicolasvila avatar pdavidc avatar randolphkim avatar revision0 avatar revo09 avatar rsirac avatar servetg avatar strikerm avatar tag3 avatar yvese avatar zglueck 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  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

webworldwind's Issues

ElevationModel can request data outside valid latitude range

ElevationModel can request elevation tiles with latitude +90 to +135. This issue does not result in any exception or error for the built-in NASA elevation server, but does generates eight unnecessary elevation tile requests. However, when ElevationModel is configured to use a WCS service, this results in a service exception.

"Is not a constructor" error with GeoJSONGeometry

I am trying to call the GeoJSONGeometry constructor. "new WorldWind.GeoJSONGeometry(...) " and i am not sure as to why it is giving me a "is not a constructor" error. Also when i try console.log(WorldWind.GeoJSONGeometry) it comes up as undefined.

SurfaceShapeTile resource leak

SurfaceShapeTile keeps adding surfaceShape state keys and never releases them.
In some circumstances, this could cause the browser tab to crash.

One possible fix would be to clear the surfaceShapeStateKeys array in the clearShapes method.

GestureRecognizer not setting _mouseButtonMask correctly

Child of #508

When disabling the GestureRecognizer upon a mouse down (registered via addEventListener from WorldWindow), then enabling again via mouse down, _mouseButtonMask is not getting set correctly. Here's my use case:

  1. User control-left clicks then left-clicks to select multiple Placemarks. I do not want the map to move because another option is for the user to control-left-click (and hold the left mouse button) to select a region. Therefore I set the GestureRecognizer to false.
  2. User then releases ctr key and right clicks which opens up a context menu (but same behavior exists without my context menu).
  3. When the user moves the mouse with no keys down and no mouse button down the map will move as if the left mouse button is down.

I tracked it down to _mouseButtonMask not getting the bits cleared out. As a workaround I set that field in my code in the mouse down handler:

if(evt.ctrlKey) {
this.wwd.navigator.primaryDragRecognizer.enabled = false;
}
else if(!this.wwd.navigator.primaryDragRecognizer.enabled) {
this.wwd.navigator.primaryDragRecognizer.enabled = true;
this.wwd.navigator.primaryDragRecognizer._mouseButtonMask = 0;
}

This appears to fix the issue. If this is not clear email me and I can explain further.

speed-up

In my experiments with web world wind engine i found the way to minimize lags on slow machines while rotating the earth.

I do following:

By right mouse i apply following crutches:

  • limit throughput of loading tiles by TiledImageLayer and ElelevationModel
  • disable Picking mode at all

And removing this crutches bu right mouse up.

I hope it will be helpful, if you want i can show my code =) good luck

KML level of detail

Child of #565

The current implementation is to load all images at once, not processing LOD .it should level by level load。

Loading several local DTMs

Child of #575

Hi,

I'm the lead devel of PlanetServer a tool to analyze hyperpesctral images of Mars and the Moon using web world wind and rasdaman. At the moment we are serving a global DTM using geoserver. One of our goals is to serve local higher resolution DTMs. We see that www is capable of serving one DTM but we are afraid that serving more than one will force us to reset the globe every time we select a new DTM. Is that the case? In case this is viable, would you suggest a way to approach it?

Thanks a lot

Offer unminified js file

For debugging it is helpful to have an unminified JS file of webworldwind. It would be convenient if that could be produced as part of the normal releases, maybe named webworldwind.src.js. The optimize: 'none' option in the grunt file for the requirejs task seems to do the trick.

Shape textures appear upside down

Texture images for some shapes appear upside down under certain conditions. Affected shapes are:

  • Polygon
  • TriangleMesh
  • GeographicMesh

This issue can be reproduced by configuring any of these shapes with a texture image and displaying a Placemark without an image in the same scene. The issue relates to #79.

WMTS object model alignment

Child of #551

The WebWorldWind WMTS implementation should be aligned with the WorldWindAndroid implementation. While most of the architecture and property naming does match between the two SDKs, the following items have not been resolved:

  • WmtsLayerCapabilities -> WmtsLayer rename (pending current WmtsLayer future)
  • plural property names (e.g. layer vs layers) in array based properties
  • boundingBox assumes two values in the upper and lower corner elements (Android just stores the strings) The specification indicates only two values

Completing these items may introduce breaking changes or name space conflicts into the current implementation, based on commit 9bd0d5d.

Bing maps key not send in the URL

When creating a Bing Layer with a personal Bing maps key, the key is not send in the URL.
Then the response received is
gov_nasa_worldwind_jsonp_0({"authenticationResultCode":"InvalidCredentials","brandLogoUri":"http://dev.virtualearth.net/Branding/logo_powered_by.png","copyright":"Copyright © 2017 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.","errorDetails":["Access was denied. You may have entered your credentials incorrectly, or you might not have access to the requested resource or operation."],"resourceSets":[],"statusCode":401,"statusDescription":"Unauthorized","traceId":"a32b43659ea6455d85fc0fb6a950c516|DB40080942|7.7.0.0|"})

Cannot read property 'getContextAttributes' of null

I just cloned this repository and tried displaying the SimplestExample.html example, but nothing showed up (just a blank browser page). In fact, none of the examples in the examples/ directory work.

What's more is that the web demo at https://worldwind.arc.nasa.gov/ does not work either. When I opened up my JS console to see if there were any error messages, I found this trace:

/js/libs/webworldwind/worldwind.js:80924 Uncaught TypeError: Cannot read property 'getContextAttributes' of null
    at WorldWindow.createContext (/js/libs/webworldwind/worldwind.js:80924)
    at new WorldWindow (/js/libs/webworldwind/worldwind.js:80523)
    at /js/main.js:98
    at Object.execCb (require-debug.js:1665)
    at Module.check (require-debug.js:874)
    at Module.<anonymous> (require-debug.js:1121)
    at require-debug.js:132
    at require-debug.js:1171
    at each (require-debug.js:57)
    at Module.emit (require-debug.js:1170)
    at Module.check (require-debug.js:925)
    at Module.<anonymous> (require-debug.js:1121)
    at require-debug.js:132
    at require-debug.js:1171
    at each (require-debug.js:57)
    at Module.emit (require-debug.js:1170)
    at Module.check (require-debug.js:925)
    at Module.<anonymous> (require-debug.js:1121)
    at require-debug.js:132
    at require-debug.js:1171
    at each (require-debug.js:57)
    at Module.emit (require-debug.js:1170)
    at Module.check (require-debug.js:925)
    at require-debug.js:624
    at each (require-debug.js:57)
    at breakCycle (require-debug.js:613)
    at require-debug.js:626
    at each (require-debug.js:57)
    at breakCycle (require-debug.js:613)
    at require-debug.js:626
    at each (require-debug.js:57)
    at breakCycle (require-debug.js:613)
    at require-debug.js:700
    at each (require-debug.js:57)
    at checkLoaded (require-debug.js:699)
    at Object.completeLoad (require-debug.js:1583)
    at HTMLScriptElement.onScriptLoad (require-debug.js:1686)

I'm running Google Chrome v56.0.2924.87 on Ubuntu 16.10 64-bit. Is this a known issue? Surely the web demo should be working?

Compass does not honor size property

In Compass.js there is a size property but in Compass.prototype.render the size is hard-coded to 0.15:

this.imageScale = 0.15 * dc.currentGlContext.drawingBufferWidth / t.imageWidth;

SurfaceShape does not render changes of the attributes

After updating an attribute (such as the interior color) of a SurfaceShapeTile renderable, the method to check if anything changed: "SurfaceShapeTile.prototype.needsUpdate", returns false, while it should return true.
Thus, the shape does not change on the globe.

Authenticated Imagery Sources with TileImageLayer

TileImageLayer forces the origin on image requests to "anonymous", see:

https://github.com/NASAWorldWind/WebWorldWind/blob/master/src/layer/TiledImageLayer.js#L480

image.crossOrigin = 'anonymous';

This doesn't work for servers requiring authentication. The appropriate value in this situation is "use-credentials".

As discussed with the development team, there is an upcoming refactoring of the image layers that will decouple the tile retrieval mechanism. This issue will be addressed as part of this refactoring.

GLSL Link Program Error on Internet Explorer 11

While attempting to load BasicExample.html WebWorldWind with an updated Internet Explorer 11, an error message to the console states: "linkProgram: Internal linker error". This error is followed by a number of null or undefined shader attribute errors.

This behavior has only been observed in IE11 on Windows 7 machines. A similar test with Windows 10 did not exhibit the error. Chrome and Firefox on the same Windows 7 machine do not have the same error.
errorlist1

Atmosphere layer suffers from clipping

See #102 for the initial bug report. This is a known issue that we plan to address using an option currently in feature/camera. This will be done similarly as in Android here: https://github.com/NASAWorldWind/WorldWindAndroid/blob/master/worldwind/src/main/java/gov/nasa/worldwind/WorldWindow.java#L1023

In the meantime, you can artificially increase the far clip distance in Navigator.js in Navigator.prototype.currentStateForModelview:

this.farDistance = WWMath.horizonDistanceForGlobeRadius(globeRadius, eyePos.altitude);
this.farDistance += 1437568.7253136805; //<-- add this line
if (this.farDistance < 1e3)
    this.farDistance = 1e3;

preventDefault doesn't work in the case of mouse leaving and entering the canvas with moudown

Child of #508

This issue shows up when the mouse is pressed while inside the canvas and is then dragged outside of the canvas and then returned to the canvas.

To replicate

  1. add an event listener to pointermove and mousemove where it only fires preventDefault
this.worldWindow.addEventListener('pointermove', function(event) {
  event.preventDefault();
});
this.worldWindow.addEventListener('mousemove', function(event) {
  event.preventDefault();
});
  1. press and hold the left mouse button inside the canvas
  2. drag the mouse outside of the canvas while still holding the mouse button
  3. return the mouse to the canvas with the mouse still depressed

The map will now be dragging with the cursor.
This affects Chrome and Firefox

Provide https version of js bundle

Many websites use https nowadays and including an http resource is not possible then. I tried https://worldwindserver.net/webworldwind/worldwindlib.js but it says that the SSL certificate is expired. A strong motivation for making this happen is that github pages enforces https:// since recently and this means that building small demo pages for WebWorldWind is only possible by copying the js file, which some may find to be a hassle, considering the size of it.

Release versions

It would be really good if Web World Wind would have a proper release procedure with versions, and those versions should then also be tagged as git tags and the release artifacts (js file) put into the corresponding github release.

Aura around the globe?

Sorry if I skipped this in the documentation, but is it possible to draw an aura around the globe?

ScreenImages clipped in FireFox when zoomed in on the globe

ScreenImages, like the Compass and ViewControls are clipped when you zoom in on the globe in FireFox. The issue does not occur in Chrome.

Following are three progressive screenshots from the SDK's Explorer app/demo demonstrating the issue.

Screenshot 1

image
Zoomed out: No clipping

Screenshot 2

image
Zoomed in: Partial clipping of Compass and ViewControls

Screenshot 3

image
Zoomed in further: Compass and all but one of ViewControls are gone. Note the PanControl ScreenImage remains. Interesting.

WMS Capabilities based layer configuration

Enhance the existing WMS layer support by offering layer configuration from a WMS Capabilities response. The client layer should use all relevant information in the Capabilities document to configure itself, and require minimal configuration from the application.

CompoundElevationModel

I would like to request a feature to compose elevations similar to the CompoundElevationModel found in WWJ.

Thanks!

AtmosphereLayer should react to its time property

Every layer in WebWW has a time property. We are about to include an util for computing the position of the sun for the new star field layer. This new layer automatically adapts depending on the value of its time property. I thus propose that the atmosphere layer also react to its time property by computing the location of the light source automatically.

Nonetheless, I wouldn't remove the lightLocation property altogether because it might be useful to applications, which need to position the sun at a defined location. Whenever, the time is set, we could simply set the lightLocation accordingly. This would still give an application the opportunity to set the lightLocation manually.

What do you think?

Sometimes SurfaceShapeTile updates incorrectly at different zoom levels

From what I see, this happens because tiles that are not needed in the current frame have their shapes cleared and at the same time prevSurfaceShapes will be set to the currentShapes.
When the tile is needed the updateIfNeeded method can not detect the difference between previous and current and the texture is never updated.

On possible fix would be to separate clearing shapes form setting the prevSurfaceShapes and setting
prevSurfaceShapes in updateTexture.
The state key is also set in updateTexture.

https://gist.github.com/strikerM/2aa6748c2e28a95c7365072d69e7e6d4

HTTPS Availability of Blue Marble and Landsat Imagery

High David. Gary Christenot here from the WorldWind TEM. It was great getting to meet you and the rest of the World Wind team. The TEM provided me with some great insights and ideas on where to take our World Wind project next. Based on our experience at Eglin I want to take a very deep dive look at Web World Wind.

I had some time Thursday night after the conclusion of the conference as well as several hours in the airport to do some exploration of Web World Wind as a self-hosted site. I set up IIS on my laptop, pulled in all of the files as local resources, including the Bootstrap, jquery, requireJS libraries, and changed the script references in the BasicExample accordingly. IE still seems to be a bit of an issue for me but successfully got FireFox and Chrome going as a local Web World Wind implementation. By monitoring network traffic I was able to verify that the only external calls going outside of my local web server were the pulls from NASA and Bing servers for the actual globe/map data. So that was a good start.

Where I hit a bit of a road block was trying to implement all of this over https, which is an iron clad requirement for any web application we host. I created a self-signed certificate and loaded it against my site to see how it would behave. The basic skeleton of the BasicExample loaded just fine, as did the Bing data. But NASA Blue Marble and Landsat imagery wouldn't load.

When I traced the network traffic, I could see that Blue Marble data was trying to load from https://worldwind25.arc.nasa.gov/wms and was not getting any response. Digging deeper in to the code I found in the BMNGLayer.js source that it is using location.protocol to set the protocol of the URL to the same as the site. To overcome my immediate issue I changed the code in BMNGLayer.js to hard wire it to "http" instead of location.protocol. That allowed the Blue Marble and Landsat imagery to load in to my World Window, but with a security complaint from the browser about mixed http/https content that had to be acknowledged.

It would seem that based on your use of location.protocol to build the imagery URL that access via either HTTP or HTTPS was to be expected. Is there something I'm missing?

In order to go forward I will definitely need to have access to an imagery source that is accessible over HTTPS, whether that is something NASA provides, I have to self-host, or perhaps can hook on to at NGA or other U.S. Government agency. While the integrity of NASA servers is obviously not in doubt, I can't guarantee that our user's would have the option of acknowledging and accepting warnings on mixed HTTP/HTTPS traffic in the browser. I have elevated privileges but most of our users would probably have their browsers locked down to not be able to accept that warning. And if they aren't locked down now, they very well could be in the future.

If NASA imagery isn't available over HTTPS, do you know if, as a U.S. Government agency, there are NGA or other U.S. Government mapping servers I might point to that would be HTTPS?

I'll reserve the idea of hosting data on an internal HTTPS resource as a last resort.
I mentioned to you that I have the Blue Marble and Landsat data in the older DDS format being served up from a local instance of World Wind WMS server that was included in v1.5 and earlier. Technically I shouldn't be hosting that on my application server since it is an HTTP resource. But because all users are on my internal network it has been allowed to slide thus far. But you mentioned there was a way I could use that data. If I have to come back to the idea of hosting my own HTTPS imagery source, perhaps we could revisit that in a later conversation.

Looking forward to working with you guys going forward!

Gary

Load higher level tiles to avoid blurrying

Child of #568

screenshot

On the left there's the WebWorldWind globe, on the right is the tile image that was loaded from virtualearth in its native resolution. As you can see, WebWorldWind zooms in quite a lot, making it blurry. In my opinion it is picking the wrong tile level for the zoom that it is in. Or am I missing something?

Z-Index of place mark has different results

I submitted a question on the Forum but no replies and this looks to be a bug. Here is the content of the forum post (http://forum.worldwindcentral.com/showthread.php?46248-Set-z-index-of-a-place-mark&p=125652#post125652) EDIT: Link is no longer valid:

"The app I'm building can have overlapping place marks. When the user clicks on one that is behind another I want to bring the selected place mark to the top. (I have a sprite place mark that renders a border around an image of a place mark.) I've tried setting alwaysOnTop to true but that does not work. I also have tried setting the eyeDistance to a very small number (everywhere from 0 to 10) separate and in conjunction with the alwaysOnTop. I recompiled the Web World Wind library to not uglify (option passed to requirejs) and when setting eyeDistance and alwaysOnTop, it does work. However the uglified version does not."

** On the forum post I have two images of the uglified vs. non-uglified results.

HTTPS map services

Migrate the NASA map services used by Web World Wind to the HTTPS protocol.

Map Services

  • BingAerialLayer
  • BingAerialWithLabelsLayer
  • BingRoadsLayer
  • BingWMSLayer
  • BMNGLandsatLayer
  • BMNGLayer
  • EarthElevationModel
  • NominatinGeocoder
  • WcsEarthElevationModel

Sometimes the annotation text is upside down.

That's because the loading of texture coordinate matrix has been omitted.
A solution would be:

  1. texCoordMatrix initialization in Annotation's constructor
    line 115:
    // Internal use only. Intentionally not documented.
    this.texCoordMatrix = Matrix.fromIdentity();

  2. texCoordMatrix loading in Annotation.prototype.doDrawOrderedAnnotation, after program.loadTextureEnabled(gl, textureBound);
    line 513:
    this.texCoordMatrix.setToIdentity();
    this.texCoordMatrix.multiplyByTextureTransform(this.labelTexture);
    program.loadTextureMatrix(gl, this.texCoordMatrix);

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.