如果在Javascript, PHP, CSS, DOM等甚至HTML的網路程式上有困難的,還有一個很棒的網頁可以參考:http://www.w3schools.com/
在摸索過程中,基本上還算順利,主要是在一個瀏覽器的問題上卡比較久:用IE和Firefox使用網路上的範例去查詢「台中市三民路」等地址時,會出現不同結果!?(我找到的所有範例都有這問題)
IE結果3筆:
- 北區三民路三段(24.152721, 120.685339)
- 西區三民路一段(24.13436, 120.671262)
- 中區三民路二段(24.142386, 120.679579)
- 豐原三民路郵局(24.253572, 120.720066)
找了好久才找到Google論壇裡的這篇文章,內容提到:
I found out that the difference really is in the language settings. It is strange because in both Firefox and IE I supply the same address string. But with different results. After adding the country name (Netherlands) to the address string, it displayed the map in Firefox. Btw right under the map there is a link to the terms of use. Internet Explorer showed the text in Dutch and Firefox in English. I actually missed that.
重點就在於地址前面必須加上國家名稱「台灣省」,Firefox才能正確解析。
另外,若要在地圖下方顯示中文「地圖資料」的話,記得在那段API key的網址裡加上「hl=zh-TW&」即可。
0 意見:
張貼留言