Sha256: 2f2fd355b76d0529b8e164bbe33b6f131e3467dc64f08585ba5f833cf867f431
Contents?: true
Size: 933 Bytes
Versions: 5
Compression:
Stored size: 933 Bytes
Contents
/* Map with scaleUpdate Event */ OpenLayers.MapZh = OpenLayers.Class(OpenLayers.Map, { initialize: function (options) { OpenLayers.Map.prototype.initialize.apply(this, [options]); this.events.addEventType("scaleUpdate") }, moveTo: function(lonlat, zoom, options) { //LOG console.log("OpenLayers.MapZh moveTo - zoom: " + zoom); if (zoom != null) { var newZoom = parseFloat(zoom); if (!this.fractionalZoom) { newZoom = Math.round(newzoom); } var resolution = this.getResolutionForZoom(newZoom); var units = this.baseLayer.units; var scale = OpenLayers.Util.getScaleFromResolution(resolution, units); this.events.triggerEvent("scaleUpdate", scale); } return OpenLayers.Map.prototype.moveTo.apply( this, arguments); }, CLASS_NAME: "OpenLayers.MapZh" });
Version data entries
5 entries across 5 versions & 1 rubygems