From ec57ccc601770ce3ef37037f582f0e17a8f8755e Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Mon, 11 Nov 2013 17:11:00 +0000 Subject: [PATCH] 2013-11-11 Sergio Martin * include/javascript/OpenLayers/OpenLayers.js: Fix layer order error that broke the zoom in google maps on GIS for incident #370 Merged from 4.1 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9052 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ .../include/javascript/OpenLayers/OpenLayers.js | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index c42c78e0e3..0c4245043f 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2013-11-11 Sergio Martin + + * include/javascript/OpenLayers/OpenLayers.js: Fix layer + order error that broke the zoom in google maps on GIS for + incident #370 + Merged from 4.1 + 2013-11-11 Sergio Martin * include/functions_treeview.php: Fix the agents query in diff --git a/pandora_console/include/javascript/OpenLayers/OpenLayers.js b/pandora_console/include/javascript/OpenLayers/OpenLayers.js index d5271c4f0f..04b5b5bf6e 100755 --- a/pandora_console/include/javascript/OpenLayers/OpenLayers.js +++ b/pandora_console/include/javascript/OpenLayers/OpenLayers.js @@ -1267,7 +1267,7 @@ if(!sameMarkerClicked){var popup=this.createPopup();OpenLayers.Event.observe(pop OpenLayers.Event.stop(evt);},clearFeatures:function(){if(this.features!=null){while(this.features.length>0){var feature=this.features[0];OpenLayers.Util.removeItem(this.features,feature);feature.destroy();}}},CLASS_NAME:"OpenLayers.Layer.GeoRSS"});OpenLayers.Layer.Google=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:0,MAX_ZOOM_LEVEL:19,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,0.00002145767211914062,0.00001072883605957031,0.00000536441802978515,0.00000268220901489257],type:null,sphericalMercator:false,dragObject:null,termsOfUse:null,poweredBy:null,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);this.addContainerPxFunction();if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters();}},loadMapObject:function(){try{this.mapObject=new GMap2(this.div);if(typeof this.mapObject.getDragObject=="function"){this.dragObject=this.mapObject.getDragObject();}else{this.dragPanMapObject=null;} this.termsOfUse=this.div.lastChild;this.div.removeChild(this.termsOfUse);if(this.isFixed){this.map.viewPortDiv.appendChild(this.termsOfUse);}else{this.map.layerContainerDiv.appendChild(this.termsOfUse);} this.termsOfUse.style.zIndex="1100";this.termsOfUse.style.display=this.div.style.display;this.termsOfUse.style.right="";this.termsOfUse.style.bottom="";this.termsOfUse.className="olLayerGoogleCopyright";this.poweredBy=this.div.lastChild;this.div.removeChild(this.poweredBy);if(this.isFixed){this.map.viewPortDiv.appendChild(this.poweredBy);}else{this.map.layerContainerDiv.appendChild(this.poweredBy);} -this.poweredBy.style.zIndex="1100";this.poweredBy.style.display=this.div.style.display;this.poweredBy.style.right="";this.poweredBy.style.bottom="";this.poweredBy.className="olLayerGooglePoweredBy gmnoprint";}catch(e){OpenLayers.Console.error(e);}},setMap:function(map){OpenLayers.Layer.EventPane.prototype.setMap.apply(this,arguments);if(this.type!=null){this.map.events.register("moveend",this,this.setMapType);}},setMapType:function(){if(this.mapObject.getCenter()!=null){if(OpenLayers.Util.indexOf(this.mapObject.getMapTypes(),this.type)==-1){this.mapObject.addMapType(this.type);} +this.poweredBy.style.zIndex="700";this.poweredBy.style.display=this.div.style.display;this.poweredBy.style.right="";this.poweredBy.style.bottom="";this.poweredBy.className="olLayerGooglePoweredBy gmnoprint";}catch(e){OpenLayers.Console.error(e);}},setMap:function(map){OpenLayers.Layer.EventPane.prototype.setMap.apply(this,arguments);if(this.type!=null){this.map.events.register("moveend",this,this.setMapType);}},setMapType:function(){if(this.mapObject.getCenter()!=null){if(OpenLayers.Util.indexOf(this.mapObject.getMapTypes(),this.type)==-1){this.mapObject.addMapType(this.type);} this.mapObject.setMapType(this.type);this.map.events.unregister("moveend",this,this.setMapType);}},onMapResize:function(){if(this.visibility&&this.mapObject.isLoaded()){this.mapObject.checkResize();}else{if(!this._resized){var layer=this;var handle=GEvent.addListener(this.mapObject,"load",function(){GEvent.removeListener(handle);delete layer._resized;layer.mapObject.checkResize();layer.moveTo(layer.map.getCenter(),layer.map.getZoom());})} this._resized=true;}},display:function(display){OpenLayers.Layer.EventPane.prototype.display.apply(this,arguments);this.termsOfUse.style.display=this.div.style.display;this.poweredBy.style.display=this.div.style.display;},removeMap:function(map){if(this.termsOfUse&&this.termsOfUse.parentNode){this.termsOfUse.parentNode.removeChild(this.termsOfUse);this.termsOfUse=null;} if(this.poweredBy&&this.poweredBy.parentNode){this.poweredBy.parentNode.removeChild(this.poweredBy);this.poweredBy=null;} @@ -2158,4 +2158,4 @@ return node;}},OpenLayers.Format.WFST.v1.prototype.writers["wfs"]),"gml":OpenLay options.featureType,srsName:options.srsName}});if(options.featureNS){node.setAttribute("xmlns:"+options.featurePrefix,options.featureNS);} if(options.propertyNames){for(var i=0,len=options.propertyNames.length;i