Hi there,

Here is the code in full, sorry about the earlier post, yeap the site
is passport protected, will email an attachment shortly.

                function setMarkers(map, appointments,
jobHasAppointment)
                {
                    var jobAppointments = appointments.split('|');
                    var j = 1;
                    var pushPinURL = $get('<%=hdnPushPinURL.ClientID
%>').value;

                    for (var i = 0; i < jobAppointments.length; i++) {

                        var riskAddress = jobAppointments[i].split('^')
[0];
                        var comments = (jobAppointments[i].split('$')
[1].indexOf('`')) ? jobAppointments[i].split('$')[1].split('`')[0] :
'';

                        geocoder.geocode({ 'address': riskAddress },
function(results, status) {
                            if (status ==
google.maps.GeocoderStatus.OK) {
 
map.setCenter(results[0].geometry.location);

                                if (jobHasAppointment ==
jobHasAppointments.Yes) {
                                    var appointmentMarkerImage = new
google.maps.MarkerImage(pushPinURL + j++ + ".png")
                                    var marker = new
google.maps.Marker({
                                        icon: appointmentMarkerImage,
                                        map: map,
                                        title: 'job#: ' + jobID,
                                        position:
results[0].geometry.location
                                    });
 
points.push(results[0].geometry.location);
                                }
                                else {
                                    var marker = new
google.maps.Marker({
                                        map: map,
                                        title: 'job#: ' + jobID,
                                        position:
results[0].geometry.location
                                    });
                                }

                                (function(jobID, comments,marker) {
 
google.maps.event.addListener(marker, 'click', function() {
                                        var infowindow = new
google.maps.InfoWindow;
                                        var content = '<div
class="infowindow">'+comments+'</div>';
 
infowindow.setContent(content);
                                        infowindow.open(map, this);
                                    });
                                })(jobID, comments, marker);

                            } else {
                                alert("Geocode was not successful for
the following reason: " + status);
                            }
                        });
                    }
                }

On Sep 30, 4:30 pm, Rossko <ros...@culzean.clara.co.uk> wrote:
> > Pls igore the earlier post, here is the full code.
>
> But as you can see, it is unreadably mangled.
>
> > google.maps.event.addListener(marker,
> > infowindow.setContent(content);
> > infowindow.open(map,
>
> Your webpage isn't accessible, password required.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to