Good man, I was looking for this everywhere.

Saved me a lot of hassle

/thumbs-up

On Jan 3, 11:55 pm, danilo <[email protected]> wrote:
> Hm, i finally figured it out, turned out to be very
> straightforward.... The $-stuff is jQuery code.
>
> <script type="text/javascript">
>         $(document).ready(function(){
>                 map = new GMap2(document.getElementById("map"));
>                 map.checkResize();
>                 map.setCenter(new GLatLng(46.785016,8.22876), 6);
>                 map.setMapType(G_HYBRID_MAP);
>
>                 GEvent.addListener(map, 'click', function(overlay, point) {
>                         if (overlay) {
>                                 map.removeOverlay(overlay);
>                         }
>                         else if (point) {
>                                 map.panTo(point);
>                                 map.clearOverlays();
>                                 var marker = new GMarker(point);
>                                 map.addOverlay(marker);
>                                 $("#koord_long").val(point.x);
>                                 $("#koord_lat").val(point.y);
>                         }
>                 });
>
>                 map.addControl(new GSmallMapControl());
>         });
> </script>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to