2011-05-11 73 views
2

我DONOT明白爲什麼我得到這個錯誤,因爲ZERO_RESULTS是由谷歌地圖API谷歌地圖未捕獲的ReferenceError:ZERO_RESULTS沒有定義

+0

你能顯示一些代碼嗎? –

+0

@Dustin萊恩 如果(狀態== ZERO_RESULTS)\t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t { \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t警報( 「否結果」); \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t回報; \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t} – koool

回答

1

定義的常數它是一個枚舉,而不是簡單的文本。

geocoder.geocode({ 'address': address}, function(results, status) { 
    if (status == google.maps.GeocoderStatus.ZERO_RESULTS) { 
     //Nadda 
    } 
}); 
+0

非常感謝你 – koool

+0

你能看看我的其他問題 http://stackoverflow.com/questions/5968035/google-maps -uncaught-typeerror-can-read-property-start-location-of-undefine – koool

+0

@Nick,還有什麼其他問題? –

相關問題