[Mapbender-commits] r1704 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Oct 2 10:00:23 EDT 2007
Author: uli
Date: 2007-10-02 10:00:23 -0400 (Tue, 02 Oct 2007)
New Revision: 1704
Modified:
trunk/mapbender/http/javascripts/map_obj.js
Log:
bug in checkScale fixed
Modified: trunk/mapbender/http/javascripts/map_obj.js
===================================================================
--- trunk/mapbender/http/javascripts/map_obj.js 2007-10-02 13:02:16 UTC (rev 1703)
+++ trunk/mapbender/http/javascripts/map_obj.js 2007-10-02 14:00:23 UTC (rev 1704)
@@ -158,16 +158,17 @@
}
rq += "&LAYERS=" + layers.join(",");
- rq += "&WIDTH=" + mapObj.getWidth();
- rq += "&HEIGHT=" + mapObj.getHeight();
+ rq += "&STYLES=" + this.getLayerstyles(mapObj).join(",");
rq += "&SRS=" + mapObj.getSRS();
rq += "&BBOX=" + mapObj.getExtent();
- rq += "&STYLES=" + this.getLayerstyles(mapObj).join(",");
+ rq += "&WIDTH=" + mapObj.getWidth();
+ rq += "&HEIGHT=" + mapObj.getHeight();
rq += "&FORMAT=" + this.gui_wms_mapformat;
+ rq += "&BGCOLOR=0xffffff&TRANSPARENT=TRUE";
rq += "&EXCEPTIONS=" + this.gui_wms_exceptionformat;
//Todo: error occurs:
//var throwNotice = new Mb_notice("getMapRequest: " + rq);
- //window.console.log("getMapRequest: " + rq);
+ window.console.log("wms.getMapRequest: " + rq);
return rq;
};
@@ -274,6 +275,7 @@
* @type string
*/
wms_const.prototype.getStyleByLayerName = function(layername){
+ //todo: get gui_layer_style
return false;
};
@@ -609,13 +611,18 @@
* @type boolean
*/
wms_layer.prototype.checkScale = function(mapObj){
+ //Todo!
+ if(mapObj.getSRS() == "EPSG:4326"){
+ return true;
+ }
+
var minScale = this.gui_layer_minscale;
var maxScale = this.gui_layer_maxscale;
var currentScale = mapObj.getScale();
if(minScale === 0 && maxScale === 0){
return true;
}
- if(minScale < currentScale || maxScale > currentScale){
+ if((minScale != 0 && minScale > currentScale) || (maxScale != 0 && maxScale < currentScale)){
return false;
}
return true;
More information about the Mapbender_commits
mailing list