Display info in marker bubble

Jun 13, 2013 at 7:11 AM

I have added custom code to display the address, suburb, postcode and state info in the marker bubble. However, it doesn't seem to pick up the information from the list. Below is my custom code.

//custom location address info and other details to display in the bubble
var colAddress = "ows_Address";
var colSuburb = "ows_Suburb";
var colPostcode = "ows_Postcode";
var colState = "ows_State";

                //getting coordinates
                lat = $(this).attr(colLatitudeInternalName);
                lng = $(this).attr(colLongitudeInternalName);

                // custom fields to display in the bubble
                edlAddress = $(this).attr(colAddress);
                edlSuburb = $(this).attr(colSuburb);
                edlPostcode = $(this).attr(colPostcode);
                edlState = $(this).attr(colState);

                if(typeof(edlAddress)=='undefined') edlAddress = "";  //optional
                if(typeof(edlSuburb)=='undefined') edlSuburb = "";  //optional
                if(typeof(edlPostcode)=='undefined') edlPostcode = "";  //optional
                if(typeof(edlState)=='undefined') edlState = "";  //optional

                if(typeof(lat)!='undefined' && typeof(lng)!='undefined')
                    gmLatLng = new google.maps.LatLng(lat, lng);
                    msgForInfoWindow = linkToListItem+"<br>";            //you may add more information-text here
                    //var msgForInfoWindow = linkToListItem+"<br>";
                    msgForInfoWindow += "<span style='font-size:0.8em;'>Address: "+edlAddress+"<br>Suburb: "+edlSuburb+"<br>Postcode: "+edlPostcode+"<br>State: "+edlState+"</span>";

                    SetMarkerForGoogleMapForSharePointList(gmLatLng, gmMap, gmBounds, title, msgForInfoWindow);
                    customAlert(title +" has undefined lat+lng. > Do not add marker on map.");