${a}
`)}function initMap() { //ANGEBOT KARTE if($('#offer_gmap').length){ var address = $('#offer_gmap').attr('addr'); geocoder = new google.maps.Geocoder(); geocoder.geocode({ 'address': address }, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var goptions = { zoom: 10, center: results[0].geometry.location, mapTypeId: google.maps.MapTypeId.ROADMAP } offer_map = new google.maps.Map(document.getElementById("offer_gmap"), goptions); var marker = new google.maps.Marker({ offer_map: offer_map, animation: google.maps.Animation.DROP, position: results[0].geometry.location, title:$('body').find('h1').html(), icon: '/img/maps_icon.png' }); marker.setMap(offer_map); } }); } //ANGEBOT KARTE SAT if($('#offer_gmap_sat').length){ var address = $('#offer_gmap_sat').attr('addr'); geocoder = new google.maps.Geocoder(); geocoder.geocode({ 'address': address }, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var goptions = { zoom: 16, center: results[0].geometry.location, mapTypeId: 'satellite' } offer_map = new google.maps.Map(document.getElementById("offer_gmap_sat"), goptions); var marker = new google.maps.Marker({ offer_map: offer_map, animation: google.maps.Animation.DROP, position: results[0].geometry.location, title:$('body').find('h1').html(), icon: '/img/maps_icon.png' }); marker.setMap(offer_map); } }); } //Small OFfers /* if($('.smalloffer_gmap').length){ $('.smalloffer_gmap').each(function(){ var address = $(this).attr('addr'); var thisId = $(this).attr('id'); geocoder = new google.maps.Geocoder(); geocoder.geocode({ 'address': address }, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var goptions = { zoom: 5, center: results[0].geometry.location } offer_map = new google.maps.Map(document.getElementById(thisId), goptions); var marker = new google.maps.Marker({ offer_map: offer_map, animation: google.maps.Animation.DROP, position: results[0].geometry.location, title:$('body').find('h1').html(), icon: '/img/maps_icon.png' }); marker.setMap(offer_map); } }); }); } */ //NEWS KARTE SAT if($('#news_gmap_sat').length){ var address = $('#news_gmap_sat').attr('addr'); geocoder = new google.maps.Geocoder(); geocoder.geocode({ 'address': address }, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var goptions = { zoom: 12, center: results[0].geometry.location, mapTypeId: 'satellite' } offer_map = new google.maps.Map(document.getElementById("news_gmap_sat"), goptions); var marker = new google.maps.Marker({ offer_map: offer_map, animation: google.maps.Animation.DROP, position: results[0].geometry.location, title:$('body').find('h1').html(), icon: '/img/maps_icon.png' }); marker.setMap(offer_map); } }); } //Angebot GT if($('#offer_gt_gmap').length){ var address = $('#offer_gt_gmap').attr('addr'); geocoder = new google.maps.Geocoder(); geocoder.geocode({ 'address': address }, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var goptions = { zoom: 13, center: results[0].geometry.location, mapTypeId: google.maps.MapTypeId.ROADMAP } offer_map = new google.maps.Map(document.getElementById("offer_gt_gmap"), goptions); var marker = new google.maps.Marker({ offer_map: offer_map, animation: google.maps.Animation.DROP, position: results[0].geometry.location, title:$('body').find('h1').html(), icon: '/img/maps_icon.png' }); marker.setMap(offer_map); } }); } //Angebot Karte mit Navigation if($('#offer_gt_gmap_wroute').length){ var address = $('#offer_gt_gmap_wroute').attr('addr'); var directionsService = new google.maps.DirectionsService; var directionsDisplay = new google.maps.DirectionsRenderer; geocoder = new google.maps.Geocoder(); geocoder.geocode({ 'address': address }, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var goptions = { zoom: 13, center: results[0].geometry.location, mapTypeId: google.maps.MapTypeId.ROADMAP } offer_map = new google.maps.Map(document.getElementById("offer_gt_gmap_wroute"), goptions); var marker = new google.maps.Marker({ offer_map: offer_map, animation: google.maps.Animation.DROP, position: results[0].geometry.location, title:$('body').find('h1').html(), icon: '/img/maps_icon.png' }); marker.setMap(offer_map); directionsDisplay.setMap(offer_map); var dest = $('#offer_gt_gmap_wroute').attr('addr'); var sContent = '
'; var infoWindow = new google.maps.InfoWindow( { content: '${a.editorialSummary}
`:""}${a.editorialSummary}
${a}
`)}