0 Replies Latest reply on Mar 10, 2011 3:00 AM by v.bannur

    Getting point on click of gMap.

    v.bannur

      Here is the code to get the point on click of google map

       

      <rich:gmap id="gm" lat="#{bean.lat}" lng="#{bean.lng}" zoom="#{bean.zoom}" gmapVar="map" locale="EN"

                 gmapKey="ABQIAAAAxU6W9QEhFLMNdc3ATIu-VxT2yXp_ZAY8_ufC3CFXhHIE1NvwkxRkrpOGzxH8_ud3inE9pG1845-FCA"

                  style="width:500px;height:400px" onclick="point(map);"/>

       

      <a4j:outputPanel>

                   <script>            

                   function place(map){         

                     alert("Lat,Lng="+map.getBounds().getNorthEast());

                     alert("Lat="+map.getBounds().getNorthEast().lat());

                     alert("Lng="+map.getBounds().getNorthEast().lng());

                     var point = new  GLatLng(lat, lng);    

                            }

      </script>

      </a4j:outputPanel>