results[0]->geometry->location->lat; $kaart['lng']=$geo->results[0]->geometry->location->lng; dbQuery('UPDATE vestigingen SET lat="'.safeDbString($kaart['lat']).'",lng="'.safeDbString($kaart['lng']).'" WHERE id='.$kaart['id']); } echo LF.'infowindow['.$kaart['id'].']=new google.maps.InfoWindow({maxWidth: "500px", content: "'; #echo ''; #if ($kaart['image1']!='') echo ''; echo '

'.$kaart['naam'].'

'; #echo '
'; echo '

'.str_replace("\n",'',str_replace("\r",'',nl2br(str_replace('"','',$kaart['adres3'])))).'

"});'.LF; echo 'var marker'.$kaart['id'].'=new google.maps.Marker({position:new google.maps.LatLng('.$kaart['lat'].','.$kaart['lng'].'),map:map,title:"'.$kaart['naam'].'",icon:"/files/images/icon.png"});'.LF; echo 'google.maps.event.addListener(marker'.$kaart['id'].',"click",function() { closeAllInfoWindow();infowindow['.$kaart['id'].'].open(map,marker'.$kaart['id'].');});'.LF; #parent.document.location="'.$href.'"; } $query=dbQuery('SELECT * FROM vestigingen WHERE active="x"'); echo ''.LF; ?>