Ticket #168: Map.js.patch
| File Map.js.patch, 0.8 kB (added by tschaub, 2 years ago) |
|---|
-
Map.js
old new 810 810 }, 811 811 812 812 /** 813 * @returns The current scale denominator of the map. 814 * If no baselayer is set, returns null. 815 * @type float 816 */ 817 getScale: function () { 818 var scale = null; 819 820 if (this.baseLayer != null) { 821 var res = this.baseLayer.getResolution(); 822 var units = this.baseLayer.units; 823 scale = res * OpenLayers.INCHES_PER_UNIT[units] * 824 OpenLayers.DOTS_PER_INCH; 825 } 826 return scale; 827 }, 828 829 /** 813 830 * @param {OpenLayers.Bounds} bounds 814 831 * 815 832 * @returns A suitable zoom level for the specified bounds.
