Revision history [back]

click to hide/show revision 1
initial version

answered 2014-05-14 09:56:57 +0800

vincentjian gravatar image vincentjian

Hi,

You can try add the zoom callback function by override the ZK openlayer widget

<script><![CDATA[
var _openlayers = {};
zk.override(openlayers.Openlayers.prototype, _openlayers, {
    bind_: function (desktop, skipper, after) {
        _openlayers.bind_.apply(this, arguments);
        this.map.events.on({
            zoomend: this.proxy(this.zoomend)
        });
    },
    zoomend: function() {
        zk.log('current zoom level', this.map.zoom);
    }
});
]]></script>

Hi,

You can try add the zoom callback function by override the ZK openlayer widget

<script><![CDATA[
zk.afterLoad('openlayers', function() {
    var _openlayers = {};
 zk.override(openlayers.Openlayers.prototype, _openlayers, {
     bind_: function (desktop, skipper, after) {
         _openlayers.bind_.apply(this, arguments);
         this.map.events.on({
             zoomend: this.proxy(this.zoomend)
         });
     },
     zoomend: function() {
         zk.log('current zoom level', this.map.zoom);
     }
    });
});
]]></script>
Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More