To date I've been using the below code with API v2 of Google maps, I'm 
trying to use the new API v3 but can't seem to change my code to work with 
the API v3, can onyone point me in the rigth direction, I've spent hours 
looking through posts and the documentation!?

Any help greatly appreciated.
 

> <script type="text/javascript">
>     //<![CDATA[
>     function createMarker(point, name)
>     {
>         var marker = new GMarker(point, {title:name});
>         return marker;
>     }
>
>     function mapclick(ov,pt)
>     {
>         if (marker) map.removeOverlay(marker);
>         if (pt) { marker = createMarker(pt,pt.toUrlValue());
>                 map.addOverlay(marker);
>                 }
>         var matchll = /\(([-.\d]*), ([-.\d]*)/.exec(pt);
>         if (matchll)
>         {
>             var lat = parseFloat( matchll[1] );
>             var lon = parseFloat( matchll[2] );
>             lat = lat.toFixed(6);
>             lon = lon.toFixed(6);
>         }
>         document.getElementById("lat").value = lat;
>         if(document.getElementById("lat").value == "undefined")
>         {
>             document.getElementById("lat").value = "";
>         }
>         document.getElementById("lon").value = lon;
>         if(document.getElementById("lon").value == "undefined")
>         {
>             document.getElementById("lon").value = "";
>         }
>     }
>
>     if (GBrowserIsCompatible()) 
>     {
>         var map=new GMap2(document.getElementById("map"));
>         map.setCenter(new GLatLng(53.558584,-7.987061), 6);
>         map.addControl(new GLargeMapControl());
>         var marker = null;
>         
> GEvent.addListener(map,\'click\',function(overlay,point){mapclick(overlay,point)});
>     }
>     //]]>
> </script>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-maps-js-api-v3/-/7k1a9pIfsXQJ.
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-js-api-v3?hl=en.

Reply via email to