-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi guys,
how can I detect a zoom event on the map by using the implementation of this blog… http://blog.zkoss.org/index.php/2012/07/03/zk-openlayers-integration/
regards
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>
Hey, i want to set the zoom and the map center with this code:
olMap.setCenter(new LonLat(currentLoc.getPosLng(), currentLoc.getPosLat()).transform(new Projection( "EPSG:4326"), olMap.getProjection()), 14, false, true);
The part which set the center works, but the zoom part not??? Any ideads...
Asked: 2014-05-13 10:56:29 +0800
Seen: 24 times
Last updated: Oct 23 '14
Send a client event with JSON data
client onSize event - Before size changes?
How to stop combining commands in an ajax call ?
zk.auSend not called on composer
Font Awesome Problem with IE8 when security option "font download" is disabled
How to capture the Browser Window Resize/Size Event
Toggled Popup - Close ONLY on toggling, not on focus lost
Verify existence -Verificar existencia DNI