'
});
google.maps.event.addListener(markerPhocaMarker5PlgPM1, 'click', function() {
infoPhocaWindow5PlgPM1.open(mapPhocaMapPlgPM1, markerPhocaMarker5PlgPM1 );
});
phocaDirServicePlgPM1 = new google.maps.DirectionsService();
phocaDirDisplayPlgPM1 = new google.maps.DirectionsRenderer();
phocaDirDisplayPlgPM1.setMap(mapPhocaMapPlgPM1);
phocaDirDisplayPlgPM1.setPanel(document.getElementById("phocaDirPlgPM1"));
google.maps.event.addDomListener(tstPhocaMapPlgPM1, 'DOMMouseScroll', CancelEventPhocaMapPlgPM1);
google.maps.event.addDomListener(tstPhocaMapPlgPM1, 'mousewheel', CancelEventPhocaMapPlgPM1); }
}
function setPhocaDirPlgPM1(fromPMAddressPlgPM1, toPMAddressPlgPM1) {
var requestPlgPM1 = {
origin: fromPMAddressPlgPM1,
destination: toPMAddressPlgPM1,
travelMode: google.maps.DirectionsTravelMode.DRIVING
};
phocaDirServicePlgPM1.route(requestPlgPM1, function(responsePlgPM1, statusPlgPM1) {
if (statusPlgPM1 == google.maps.DirectionsStatus.OK) {
pPIPlgPM1 = document.getElementById('phocaMapsPrintIconPlgPM1');
pPIPlgPM1.style.display='block';
var from64PlgPM1 = Base64.encode(fromPMAddressPlgPM1).toString();
var to64PlgPM1 = Base64.encode(toPMAddressPlgPM1).toString();
pPIPlgPM1.innerHTML = '
Print Route
';
phocaDirDisplayPlgPM1.setDirections(responsePlgPM1);
} else if (google.maps.DirectionsStatus.NOT_FOND) {
alert("One of the locations specified in the requests's origin, destination, or waypoints could not be geocoded.");
} else if (google.maps.DirectionsStatus.ZERO_RESULTS) {
alert("No route could be found between the origin and destination.");
} else if (google.maps.DirectionsStatus.MAX_WAYPOINTS_EXCEEDED) {
alert("Too many DirectionsWaypoints were provided in the DirectionsRequest.");
} else if (google.maps.DirectionsStatus.OVER_QUERY_LIMIT) {
alert("Webpage has sent too many requests within the allowed time period.");
} else if (google.maps.DirectionsStatus.INVALID_REQUEST) {
alert("The provided DirectionsRequest was invalid.");
} else if (google.maps.DirectionsStatus.REQUEST_DENIED) {
alert("Webpage is not allowed to use the directions service.");
} else if (google.maps.DirectionsStatus.UNKNOWN_ERROR) {
alert("Directions request could not be processed due to a server error. The request may succeed if you try again.");
} else {
alert("Directions request could not be processed due to a server error. The request may succeed if you try again.");
}
});
}
function initializePlgPM1() {
tstPhocaMapPlgPM1.setAttribute("oldValuePlgPM1",0);
tstPhocaMapPlgPM1.setAttribute("refreshMapPlgPM1",0);
tstIntPhocaMapPlgPM1 = setInterval("CheckPhocaMapPlgPM1()",500);
}
google.setOnLoadCallback(initializePlgPM1);
//]]>