Like this:http://blog.zkoss.org/index.php/2012/07/03/zk-openlayers-integration/
Just 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>
Just 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>
No comments:
Post a Comment