FR / EN
Racecourse of Le Lion d'Angers

Consumer Area

Learn more
Espace Grand Public

Professionnals Area

Learn more
Espace Professionnels

Business Area

Learn more
Espace Entreprises

Access to the racecourse

Calculate the route to go to the Racecourse of Le Lion d'Angers

initializeGM(); }); $(window).resize(function(){ initializeGM(); }); // Gestion du parallax - désactivé sur les devices Apple if(!navigator.userAgent.match(/iPhone/i)&&!navigator.userAgent.match(/iPod/i)&&!navigator.userAgent.match(/iPad/i)){var cercle_grand=$(".cercle_grand").position();var cercle_d=$(".cercle_d").position();var cercle_gg=$(".cercle_gg").position();var cercle_g=$(".cercle_g").position();var cheval_d=$(".cheval_d").position();var cheval_dd=$(".cheval_dd").position();var cheval_g=$(".cheval_g").position();var cheval_gg=$(".cheval_gg").position();$("body").mousemove(function(e){var t=$(this).offset();var n=e.pageX-t.left;var r=e.pageY-t.top;var i=Math.round(n/$(this).width()*100);var s=Math.round(r/$(this).height()*100);var o=6;var u=10;var a=10;var f=25;var l=25;var c=50;var h=50;var p=cercle_grand.left+Math.round(o*(i/100));$(".cercle_grand").css("left",p+"px");var d=$(".animation").width()-$(".cercle_d").width()-cercle_d.left-Math.round(o*(i/100));$(".cercle_d").css("right",d+"px");var v=cercle_gg.left+Math.round(o*(i/100));$(".cercle_gg").css("left",v+"px");var m=cercle_g.left+Math.round(u*(i/100));var g=cercle_g.top+Math.round(a*(s/100));$(".cercle_g").css("top",g+"px").css("left",m+"px");var y=$(".animation").width()-$(".cheval_d").width()-cheval_d.left-Math.round(f*(i/100));var b=cheval_d.top+Math.round(l*(s/100));$(".cheval_d").css("top",b+"px").css("right",y+"px");var w=$(".animation").width()-$(".cheval_dd").width()-cheval_dd.left-Math.round(c*(i/100));var E=cheval_dd.top+Math.round(h*(s/100));$(".cheval_dd").css("top",E+"px").css("right",w+"px");var S=cheval_g.left+Math.round(c*(i/100));var x=cheval_g.top+Math.round(h*(s/100));$(".cheval_g").css("top",x+"px").css("left",S+"px");var T=cheval_gg.left+Math.round(f*(i/100));var N=cheval_gg.top+Math.round(l*(s/100));$(".cheval_gg").css("top",N+"px").css("left",T+"px")})} // Gestion du Menu en responsive $("#contain").on("click",".btn_menu",function(e){e.preventDefault();if(!$(".option_header").hasClass("actif")){$(".option_header").addClass("actif")}else{$(".option_header").removeClass("actif")}}) var map; var currentPOI; var geocoder; var directionsService; var directionsDisplay; var hippodrome_map = new google.maps.LatLng(47.62303492815614, -0.697932243347168); var MY_MAPTYPE_ID = 'custom_style'; function initializeGM() { var ast_style = [ { "featureType": "road", "stylers": [ { "color": "#b5b4b5" }, { "weight": 0.8 } ] },{ "elementType": "labels.text.stroke", "stylers": [ { "color": "#ffffff" } ] },{ "elementType": "labels.text.fill", "stylers": [ { "color": "#000000" } ] },{ "elementType": "labels.text.stroke", "stylers": [ { "color": "#ffffff" }, { "weight": 2 } ] },{ "featureType": "road", "elementType": "labels.icon", "stylers": [ { "visibility": "off" } ] } ]; var mapOptions = { zoom: 14, center: hippodrome_map, panControl: false, mapTypeControl: false, zoomControl: false, streetViewControl: false, mapTypeId: MY_MAPTYPE_ID }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var styledMapOptions = { name: 'Sociéte des Courses du Lion d\'Angers' }; var customMapType = new google.maps.StyledMapType(ast_style, styledMapOptions); map.mapTypes.set(MY_MAPTYPE_ID, customMapType); //var icon_ast = '/wp-content/themes/atm-theme/library/images/icon-map.png'; var ast_gps = new google.maps.LatLng(47.62303492815614, -0.697932243347168); var titre = "Sociéte des Courses du Lion d'Angers"; var astMarker = new google.maps.Marker({ position: ast_gps, map: map, //icon: icon_ast, title : titre }); // Options de la fenêtre var WindowOptions = { content: "

Sociéte des Courses du Lion d'Angers

"+ "

Parc Départemental de l'Isle Briand
"+ "49220 Le Lion-d'Angers

"+ "

Tél. : 02 41 95 32 79

" }; // Fonction de calcul d'itinéraires geocoder = new google.maps.Geocoder(); directionsService = new google.maps.DirectionsService(); directionsDisplay = new google.maps.DirectionsRenderer({ suppressMarkers: false }); directionsDisplay.setMap(map); google.maps.event.addListener(directionsDisplay, 'directions_changed', function() { computeTotalDistance(directionsDisplay.directions); }); // Création de la fenêtre var InfoWindow = new google.maps.InfoWindow(WindowOptions); InfoWindow.open(map,astMarker); // Affichage de la fenêtre au click sur le marker google.maps.event.addListener(astMarker, 'click', function() { InfoWindow.open(map,astMarker); }); setTimeout(function(){ google.maps.event.trigger(map, 'resize'); },400); function computeTotalDistance(result) { var total = 0; var time= 0; var from=0; var to=0; var myroute = result.routes[0]; for (var i = 0; i < myroute.legs.length; i++) { total += myroute.legs[i].distance.value; time +=myroute.legs[i].duration.text; from =myroute.legs[i].start_address; to =myroute.legs[i].end_address; } /*time = time.replace('heures','h'); time = time.replace('heure','h'); time = time.replace('minutes',''); time = time.replace('minute',''); time = time.replace('min','');*/ total = total / 1000. console.log('From :'+from + '-'+to); console.log('Temps de trajet : '+time); console.log('Distance : '+Math.round(total)+" km"); $('.contain_page').find('.details').html('
Détails de l\'itinéraire
Temps de trajet : '+time+'
Distance : '+Math.round(total)+' km'); } function getDir(clientAddress, lati, longi, cont) { console.log('getDir : '+clientAddress+' - '+lati+' - '+longi+' - '+cont); geocoder.geocode({ 'address': clientAddress }, function (results, status) { console.log('Results : '+results+' - '+status+' - '+lati+' - '+longi+' - '+cont); if (status == google.maps.GeocoderStatus.OK) { var origin = results[0].geometry.location; var destination = new google.maps.LatLng(lati,longi); var request = { origin: origin, destination: destination, travelMode: google.maps.DirectionsTravelMode.DRIVING }; directionsService.route(request, function (response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); } }); } else { cont.val("Impossible de calculer l'itinéraire."); } }); } $('.contain_page').on('click','input[type="button"]',function(){ var lati = parseFloat($(this).parent().children('.latitude').val()); var longi = parseFloat($(this).parent().children('.longitude').val()); var cont = $(this).parent().children('.clientAddress'); var clientAddress = cont.val(); currentPOI = $(this).parents('.gm-style-iw'); console.log('BOUTON : '+clientAddress+' - '+lati+' - '+longi+' - '+cont); getDir(clientAddress, lati, longi, cont); }) }