| Server IP : 54.36.91.62 / Your IP : 216.73.217.94 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/amisdesseniors-fr/lemans/administrator/components/com_mymaplocations/assets/ |
Upload File : |
jQuery.noConflict();
function roundNumber(num, dec) {
return Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
}
var sfHover = function()
{
var sfEls = document.getElementById("nav").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++)
{
sfEls[i].onmouseover=function()
{
this.className+=" sfhover";
}
sfEls[i].onmouseout=function()
{
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
// common Google Map functions
function GetElevation(lat, long, selector){
var elevator = new google.maps.ElevationService();
var locations = [];
// Retrieve the clicked location and push it on the array
locations.push(new google.maps.LatLng(lat, long));
// Create a locationElevationRequest object using the array's one value
var positionalRequest = {
'locations': locations
};
// Initiate the location request
elevator.getElevationForLocations(positionalRequest,
function(results, status) {
if (status == google.maps.ElevationStatus.OK) {
// Retrieve the first result
if (results[0]) {
jQuery(selector).html(Math.round(results[0].elevation) + " metres.");
}
else {
jQuery(selector).html("Not found");
}
}
else {
jQuery(selector).html("Not found");
}
}
);
}
function ReverseGeocode(lat, long, selector){
var geocoder = new google.maps.Geocoder();
var latLong = new google.maps.LatLng(lat, long);
var streetNumber = '';
var streetName = '';
var country = '';
var postalCode = '';
var city = '';
var estate='';
geocoder.geocode({
'latLng': latLong
}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
if (results) {
var foundAddress = false;
for (var i=0; i<results.length; i++) {
if ((results[i].types[0] == 'street_address') || (results[i].types[0] == 'route')) {
jQuery.each(results[i].address_components, function(k,v1) {jQuery.each(v1.types, function(k2, type){
if (type == 'street_number') {
streetNumber = v1.long_name;
}
if (type == 'route') {
streetName = v1.long_name;
}
if (type == 'administrative_area_level_1') {
estate = v1.long_name;
}
if (type == 'country') {
country = v1.long_name;
}
if (type == 'postal_code') {
postalCode = v1.long_name;
}
if (type == 'locality') {
city = v1.long_name;
}
});})
jQuery("#jform_address").val(streetNumber+" "+streetName);
jQuery("#jform_town").val(city);
jQuery("#jform_country").val(country);
jQuery("#jform_postal").val(postalCode);
jQuery("#jform_locationstate").val(estate);
foundAddress = true;
break;
}
}
if (!foundAddress) {
jQuery("#jform_address").html(results[0].formatted_address);
}
}
}
});
}
function getDirectionStatusText(status){
switch(status){
case google.maps.DirectionsStatus.INVALID_REQUEST :
return "Invalid request";
case google.maps.DirectionsStatus.MAX_WAYPOINTS_EXCEEDED :
return "Maximum waypoints exceeded";
case google.maps.DirectionsStatus.NOT_FOUND :
return "Not found";
case google.maps.DirectionsStatus.OVER_QUERY_LIMIT :
return "Over query limit";
case google.maps.DirectionsStatus.REQUEST_DENIED :
return "Request denied";
case google.maps.DirectionsStatus.UNKNOWN_ERROR :
return "Unknown error";
case google.maps.DirectionsStatus.ZERO_RESULTS :
return "Zero results";
default:
return status;
}
}