[Opengeoscience-developers] OpenGeoscience branch, add_point_source, updated. c75f17b57266558bc96568261f570a5785ec52a2

Aashish Chaudhary aashish.chaudhary at kitware.com
Fri Mar 8 19:59:27 EST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "OpenGeoscience".

The branch, add_point_source has been updated
       via  c75f17b57266558bc96568261f570a5785ec52a2 (commit)
      from  5a6b316020debc3d527f0bf3b6f2af5f9f629463 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://public.kitware.com/gitweb?p=OpenGeoscience/opengeoscience.git;a=commitdiff;h=c75f17b57266558bc96568261f570a5785ec52a2
commit c75f17b57266558bc96568261f570a5785ec52a2
Author:     Aashish Chaudhary <aashish.chaudhary at kitware.com>
AuthorDate: Fri Mar 8 19:58:10 2013 -0500
Commit:     Aashish Chaudhary <aashish.chaudhary at kitware.com>
CommitDate: Fri Mar 8 19:58:10 2013 -0500

    Final fix for map image not showing up sometimes

diff --git a/web/lib/geo/map.js b/web/lib/geo/map.js
index a608e2b..5802b92 100644
--- a/web/lib/geo/map.js
+++ b/web/lib/geo/map.js
@@ -283,28 +283,21 @@ geoModule.map = function(node, options) {
     return false;
   }
 
-  /**
-   * On successful loading of the background imagery for
-   * map, use the image as texture and redraw the map.
-   *
-   */
-  function updateMapImage(image) {
-    var worldTexture = new vglModule.texture();
-    worldTexture.updateDimensions();
-    worldTexture.setImage(worldImage);
-    m_baseLayer.material().addAttribute(worldTexture);
-    draw();
-  }
-
   // TODO use zoom and center options
   m_baseLayer = (function() {
     var mapActor = ogs.vgl.utils.createTexturePlane(-180.0, -90.0, 0.0, 180.0,
                                                     -90.0, 0.0, -180.0, 90.0,
                                                     0.0);
     // Setup texture
-    worldImage = new Image();
+    var worldImage = new Image();
     worldImage.src = "./data/land_shallow_topo_2048.png";
-    worldImage.onload = updateMapImage;
+    worldImage.onload = function() {
+      var worldTexture = new vglModule.texture();
+      worldTexture.updateDimensions();
+      worldTexture.setImage(worldImage);
+      m_baseLayer.material().addAttribute(worldTexture);
+      draw();
+    };
 
     m_renderer.addActor(mapActor);
     document.onmousedown = handleMouseDown;
diff --git a/web/lib/vgl/utils.js b/web/lib/vgl/utils.js
index c628f82..438c035 100644
--- a/web/lib/vgl/utils.js
+++ b/web/lib/vgl/utils.js
@@ -285,7 +285,6 @@ vglModule.utils.createPointSpritesMaterial = function(imageFilename) {
   var texture = new vglModule.texture();
   texture.setImage(image);
   mat.addAttribute(texture);
-
   return mat;
 };
 

-----------------------------------------------------------------------

Summary of changes:
 web/lib/geo/map.js   |   23 ++++++++---------------
 web/lib/vgl/utils.js |    1 -
 2 files changed, 8 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
OpenGeoscience



More information about the Opengeoscience-developers mailing list