-
FEATURED COMPONENTS
First time here? Check out the FAQ!
try this in the demo and see what I mean. Tried in IE8 winXP and FF3.5.5 Ubuntu. Klick the top-button and try to pan/move the map around.
The map is initialized invisible and set visible on buttoinclick. Canvas then is only 1/3 to half initialized.
<window title="Google Maps"> <div style="border: 1px solid red;margin-top:10px;margin-bottom:20px" if="${empty sessionScope.gmapsKey}"> To use Google Maps for this site, you have to assign a proper key first. Check the source codes of org.zkoss.zkdemo.userguide.MainWindow for details. </div> <vbox> <button label="Set Map visible for bug demonstration" onClick="mymap.setVisible(true);" /> <gmaps id="mymap" width="700px" height="500px" visible="false" showSmallCtrl="true"> <attribute name="onMapMove"> mylat.setValue(self.getLat()); mylng.setValue(self.getLng()); </attribute> <attribute name="onMapZoom"> myzoom.setValue(self.getZoom()); </attribute> <attribute name="onMapClick"> Gmarker gmarker = event.getGmarker(); if (gmarker != null) { gmarker.setOpen(true); } </attribute> <ginfo id="myinfo" open="true"> <attribute name="content"> Hello, <a href="http://www.zkoss.org">ZK</a>. </attribute> </ginfo> <gmarker id="mymark" lat="37.4410" lng="-122.1490"> <attribute name="content"> Hello, <a href="http://www.zkoss.org">ZK</a> on top of Gmarker. </attribute> </gmarker> </gmaps> <grid><rows> <row>Latitude: <doublebox id="mylat" value="${mymap.lat}" onChange="mymap.panTo(self.doubleValue(), mymap.getLng())"/></row> <row>Longitude: <doublebox id="mylng" value="${mymap.lng}" onChange="mymap.panTo(mymap.getLat(), self.doubleValue())"/></row> <row>Zoom Level: <intbox id="myzoom" value="${mymap.zoom}" onChange="mymap.setZoom(self.getValue())"/></row> <row>Open Info: <button label="Change" onClick="myinfo.isOpen() ? mymark.setOpen(true) : myinfo.setOpen(true)"/></row> </rows></grid> </vbox> </window>
I'll file this this one in SF.net. The bug seems to be in all ZK5 gmapsz. not only 2.0.50
Timo
Asked: 2010-01-09 08:50:22 +0800
Seen: 540 times
Last updated: Sep 17 '10