-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi everyone, I trying get the lat/lng from Gmarker, but every time its return the same value. I just can get the values from Gmaps, but dont' solve my problem. The alerts is for tests. I need the lat and lng from gmarker when the user drop it. The code:
<gmaps id="map" use="gmaps.GMapExt"
width="100%" zoom="14" height="300px" showSmallCtrl="true"
lat="@{gm.lat}" lng="@{gm.lng}">
<gmarker id="gm" draggable="true" >
<attribute name="onMapDrop">
<![CDATA[
alert("gMarker -\n\nLat:" + self.lat + "\nLng:" +self.lng);
]]>
</attribute>
</gmarker>
</gmaps>
Is this what you want (put it in you composer)?
/**
* Pan to marker position on the drop of a marker.
* @param event
* @throws InterruptedException
*/
public void onMapDrop$gmap(MapDropEvent event) throws InterruptedException {
lat = event.getLat();
lng = event.getLng();
gmap.panTo(lat, lng);
}
Asked: 2013-05-21 22:02:52 +0800
Seen: 16 times
Last updated: Jun 04 '13
composite component help [closed]
EL in a forEach @command not working?
Different template for each grid row
Cardlayout animation is broken
Grid RowRender slow using 6.5.1 and sizable=true
setVisible(false), component will load or not
Decimalbox and doublebox value rounded on iPad
history management with page status