function loadMapsAPI(){ldelim}if(window.google&&google.maps)return;{rdelim}window.initMap=function(){ldelim}{rdelim} loadMapsAPI();$(document).ready(function(){ldelim}loadMap{$gmap.id}();{rdelim});var defaultZoom{$gmap.id}={$gmap.gmap_zoom};var map{$gmap.id};var infowindow{$gmap.id};var markerList{$gmap.id}=[];function loadMap{$gmap.id}(){ldelim}console.log('loadMap');var defaultLatlng{$gmap.id}=new google.maps.LatLng({$gmap.latitude},{$gmap.longitude});var myOptions{$gmap.id}={ldelim}zoom:defaultZoom{$gmap.id},center:defaultLatlng{$gmap.id},mapTypeId:google.maps.MapTypeId.ROADMAP{rdelim};map{$gmap.id}=new google.maps.Map(document.getElementById("myMap{$gmap.id}"),myOptions{$gmap.id});infowindow{$gmap.id}=new google.maps.InfoWindow({ldelim}maxWidth:700{rdelim});loadMarkers{$gmap.id}();{rdelim} function loadMarkers{$gmap.id}(){ldelim}var lmarkers{$gmap.id}={$markers};$.each(lmarkers{$gmap.id},function(i,item){ldelim}loadMarker{$gmap.id}(item);{rdelim});{rdelim} function loadMarker{$gmap.id}(markerData){ldelim}var myLatlng=new google.maps.LatLng(markerData['latitude'],markerData['longitude']);var image='/modules/gmap/images/'+markerData['image']+'.png';if(markerData['img_title']!='/modules/gmap/img/no_image.png'){ldelim}var a_stimg="";{rdelim}else{ldelim}var a_stimg="";{rdelim};if(markerData['marker_cat_title']!=''){ldelim}if(markerData['marker_cat_link']=='/'||markerData['marker_cat_link']=='javascript:void(0);'){ldelim}var a_categ="
  • "+markerData['marker_cat_title']+"
  • ";{rdelim}else{ldelim}var a_categ="
  • "+markerData['marker_cat_title']+"
  • ";{rdelim}{rdelim}else{ldelim}var a_categ='';{rdelim};if(markerData['title']!=''){ldelim}if(markerData['title_link']=='/'||markerData['title_link']=='javascript:void(0);'){ldelim}var a_title="
  • "+markerData['title']+"
  • ";{rdelim}else{ldelim}var a_title="
  • "+markerData['title']+"
  • ";{rdelim}{rdelim}else{ldelim}var a_title='';{rdelim};if(markerData['marker_street']!=''){ldelim}var a_city="
  • "+markerData['marker_city']+", "+markerData['marker_street']+", "+markerData['marker_building']+"
  • ";{rdelim}else{ldelim}var a_city='';{rdelim};if(markerData['marker_dopfield']!=''){ldelim}var a_dopfield="
  • "+markerData['marker_dopfield']+"
  • ";{rdelim}else{ldelim}var a_dopfield='';{rdelim};if(markerData['marker_phone']!=''){ldelim}var a_phone="
  • "+markerData['marker_phone']+"
  • ";{rdelim}else{ldelim}var a_phone='';{rdelim};if(markerData['marker_www']!=''){ldelim}var a_placeholders=new Array('http://www.','https://www.','http://','https://');var a_www="
  • "+str_replace(a_placeholders,'www.',markerData['marker_www'])+"
  • ";{rdelim}else{ldelim} var a_www='';{rdelim};var a_divs="
    ";var a_dive="
    ";var a_uls="