← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6724: (GIS) Offline mode bug fixed.

 

------------------------------------------------------------
revno: 6724
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-04-24 15:17:38 +0000
message:
  (GIS) Offline mode bug fixed.
modified:
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js	2012-03-26 15:08:13 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js	2012-04-24 15:17:38 +0000
@@ -2928,17 +2928,20 @@
                 symbolLayer.setOpacity(1);
                 centroidLayer.setOpacity(1);
                 
-				if (G.vars.parameter.base === 'googlestreets') {
+				if (G.vars.parameter.base === 'googlestreets' && window.google) {
 					G.vars.map.getLayersByName('Google Streets')[0].setVisibility(true);
 				}
-				else if (G.vars.parameter.base === 'googlehybrid') {
+				else if (G.vars.parameter.base === 'googlehybrid' && window.google) {
 					G.vars.map.getLayersByName('Google Hybrid')[0].setVisibility(true);
 				}
+				else if (G.vars.parameter.base !== 'osm' && window.google) {
+					G.vars.map.getLayersByName('Google Streets')[0].setVisibility(false);
+				}
 				else if (G.vars.parameter.base === 'osm') {
 					G.vars.map.getLayersByName('OpenStreetMap')[0].setVisibility(true);
 				}
 				else {
-					G.vars.map.getLayersByName('Google Streets')[0].setVisibility(false);
+					G.vars.map.getLayersByName('OpenStreetMap')[0].setVisibility(false);
 				}
                 
                 var svg = document.getElementsByTagName('svg');