Re: [請益] Google map輸入住址後直接show map的應用
看板Google (谷歌Google)作者doenkiss (Doenkiss)時間16年前 (2009/09/12 01:22)推噓1(1推 0噓 5→)留言6則, 1人參與討論串2/2 (看更多)
之前做專案的時候有找過相關的資訊,不知道是不是你要的效果
function showAddress(address) {
if (geocoder) {
geocoder.getLatLng(
address,
function(point) {
if (!point) {
alert("很抱歉,我們找不到"" + address + ""這個地址。");
} else {
map.setCenter(point, 15);
var marker = new GMarker(point);
}
}
);
}
}
--
<form action="#" onsubmit="showAddress(this.address_sreach.value); return fal
se">
<input type="text" name="address_sreach" value=""/>
<input type="submit" value="Go!"/>
</form>
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.57.129.247
※ 編輯: doenkiss 來自: 61.57.129.247 (09/12 01:23)
推
09/13 14:37, , 1F
09/13 14:37, 1F
→
09/13 14:38, , 2F
09/13 14:38, 2F
→
09/13 14:38, , 3F
09/13 14:38, 3F
→
09/13 14:39, , 4F
09/13 14:39, 4F
→
09/13 14:40, , 5F
09/13 14:40, 5F
→
09/13 14:40, , 6F
09/13 14:40, 6F
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):
Google 近期熱門文章
PTT數位生活區 即時熱門文章