我有一个数据库驱动的网站,它获取地址,地址显示在谷歌地图上。这是包含谷歌地图嵌入的字符串。我没有位置的纬度,但我有地址和区域。地点没有出现。
<?php $add = $row_rsDoc['Address'];
$address = str_replace(" ","+",$add);
$gtown = str_replace(" ","+",$row_rsDoc['Town']);
$gprov = str_replace(" ","+",$row_rsDoc['Province']);
$googlestr=$address.','.'+'.$gtown.','.'+'.$gprov;
echo $googlestr;
?>
<th width="446" class="entry" scope="col"><iframe width="441" height="243" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.co.za/maps?f=q&source=s_q&hl=en&geocode=&q=<?php echo $googlestr; ?>&aq=&sll=-26.178375,28.033719&ie=UTF8&hq=&hnear=&radius=15000&t=m&output=embed"></iframe><br />