nasaworldwind / webworldwind Goto Github PK
View Code? Open in Web Editor NEWThe NASA WorldWind Javascript SDK (WebWW) includes the library and examples for creating geo-browser web applications and for embedding a 3D globe in HTML5 web pages.
The NASA WorldWind Javascript SDK (WebWW) includes the library and examples for creating geo-browser web applications and for embedding a 3D globe in HTML5 web pages.
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
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.
In the examples, e.g. http://worldwindserver.net/webworldwind/examples/PlacemarksAndPicking.html, when clicking on OpenStreetMap, it comes up with error tiles.
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;
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:
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.
My bad, it is already reported
#61
It would be convenient to have a text outline color to provide contrast to GeographicText shapes.
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?
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.
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.
Texture images for some shapes appear upside down under certain conditions. Affected shapes are:
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.
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.
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.
Pair
the line 94
StyleResolver
Should not be used directly,
Here is KML for testing
huoche.kml
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:
And removing this crutches bu right mouse up.
I hope it will be helpful, if you want i can show my code =) good luck
Establish continuous builds and daily builds for the Web World Wind library.
That's because the loading of texture coordinate matrix has been omitted.
A solution would be:
texCoordMatrix initialization in Annotation's constructor
line 115:
// Internal use only. Intentionally not documented.
this.texCoordMatrix = Matrix.fromIdentity();
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);
Child of #509
When I zoom to a place with negative elevations such as the ocean the view cuts off the closer the camera gets to the actual suface.
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.
In attempting to add KML I am receiving the following error
Uncaught TypeError: StyleResolver.handleRemoteStyle is not a function
at worldwind.js:64062
The errors are thrown when the mouse moves over the canvas containing the WorldWindow
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:
Completing these items may introduce breaking changes or name space conflicts into the current implementation, based on commit 9bd0d5d.
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.
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?
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;
Child of #568
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?
Child of #509
Mouse drag input does not match globe movement when using the Mercator projection and the eye altitude less than 60km.
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.
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
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|"})
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
pointermove
and mousemove
where it only fires preventDefaultthis.worldWindow.addEventListener('pointermove', function(event) {
event.preventDefault();
});
this.worldWindow.addEventListener('mousemove', function(event) {
event.preventDefault();
});
The map will now be dragging with the cursor.
This affects Chrome and Firefox
See forum thread
sometimes mouseover on one collada object is recognized as mouseover over other collada object
Child of #508
Adding a wheel
event listener and using preventDefault does not prevent zooming from occurring.
Child of #567
Tiled data sources such as TiledImageLayer appear to reach an insufficient level of detail when the window dimensions result in a tall viewport. The underlying cause may relate to NASAWorldWind/WorldWindAndroid#69.
Sorry if I skipped this in the documentation, but is it possible to draw an aura around the globe?
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.
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.
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.
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
The addAllSurfaceShapes method in SurfaceShapeTile just calls itself in a for loop, but doesn't do anything with the result.
I think the intention was to call this.addSurfaceShape(shape).
Child of #553
I'd love to see an implementation of the NASAWFSPlaceNameLayer.java layer in the web version.
It uses the NASA Web Feature Service here: http://worldwind22.arc.nasa.gov/geoserver/wfs
And delivers "place name" data for locations from Continents to Oceans, all the way down to small cities.
Child of #565
The current implementation is to load all images at once, not processing LOD .it should level by level load。
Retrieval and display of imagery from an OGC Web Map Tile Services conforming to the NSG profile.
Can I set the background image, it does not need to turn with the globel
Migrate the NASA map services used by Web World Wind to the HTTPS protocol.
Map Services
I would like to request a feature to compose elevations similar to the CompoundElevationModel found in WWJ.
Thanks!
see this
Detailed description
.
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.
Zoomed in: Partial clipping of Compass and ViewControls
Zoomed in further: Compass and all but one of ViewControls are gone. Note the PanControl ScreenImage remains. Interesting.
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.