Here is the code I am using to get a map on a person's profile in my
social networking site (based on DotNetNuke and Active Social).

It works fine except I need to know *exactly* where to put the code to
get directions link function in the info popup.

I would appreciate any help.

thanks,

Willie

    <div id="map_canvas" style="width: 500px; height: 300px"></div>

    <!-- replace key=abcdefg with your GoogleMaps API Key  -->
    <script src="http://maps.google.com/maps?
file=api&v=2&key=mykey
sensor=false" type="text/javascript"></script>
    <script type="text/javascript">



    function Ginitialize() {

      if (GBrowserIsCompatible()) {



        var address = "[DNN:PROFILE:Street], [DNN:PROFILE:City],
[DNN:PROFILE:Region] [DNN:PROFILE:PostalCode], [DNN:PROFILE:Country]"
        var map = new GMap2(document.getElementById("map_canvas"),
{ size: new GSize(650,400) });
        geocoder = new GClientGeocoder();
        if (geocoder) {
          geocoder.getLatLng(
            address,
            function(point) {
              if (!point) {
                //alert(address + " not found");
              } else {
                map.setCenter(point, 10);
                var marker = new GMarker(point);
                map.addOverlay(marker);
                marker.openInfoWindowHtml(address);
              }
            }
         );
        }
        map.setUIToDefault();
      }
    }


// Note: Really should register new events in case there are already
onload/onunload events...
//        but for now will just replace current onload/onunload events
//RegisterNewEvent(document.body,"onload",Ginitialize());
//RegisterNewEvent(document.body,"onunload",GUnload());

   document.body.onLoad=Ginitialize();
   document.body.onUnload=GUnload();

    </script>
ript>

--~--~---------~--~----~------------~-------~--~----~
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