-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I'm having difficulty with the Drag'n'Drop functionality in the Google Maps API V3 enabled release of ZK's Gmaps and Gmarker components.
Using the old API and zkgmapsz 2.0.51, something like this used to work fine and onMapDrop could be used to get the map coordinates where the marker had been dropped after dragging it:
<zk> <script content="zk.googleAPIkey='Google Maps API Key'" ></script> <div id="leWin"> <gmaps id="leMap" lat="-33.86" lng="151.210252" width="800px" height="600px" zoom="16" showSmallCtrl="true" showTypeCtrl="true" showZoomCtrl="true" > <gmarker id="leMarker" lat="-33.857" lng="151.215" draggable="true"></gmarker> </gmaps> </div> </zk>
After making the switch to version 3.0.0 dragging the marker no longer works at all, the left click registers on the map itself and pans that around instead.
Now I did find this comment on the zkgmapsz release notes for the 3.0.0-BETA:
+ Currently not support drag between map items and ZK components
I thought this only meant something like dragging map items (markers?) outside of the map and dropping them onto other ZK components was currently not supported (also implying that this would eventually be possible). Was this comment in fact meant to tell us that Drag'n'drop, as it applies to 2.0.51, is not working in 3.0.0 at all?
Note: I'm using the current ZK release 6.0.1
Has anyone got drag'ndrop working with version 3.0.0?
Please, I'd just like to know if there is a point in tinkering around with this at all or that I'll just have to revert to 2.0.51 and the old Google Maps API.
Hi!
Yes i do: myMarker.setDraggingEnabled(true/false) made my day :)
Giovanni
Asked: 2012-05-16 05:37:04 +0800
Seen: 228 times
Last updated: May 24 '12