We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

PositionError.code

PositionError.code 是一個唯讀無符號整數(unsigned short)表示錯誤碼 。以下列出可能的值:

相對應的常數 描述
1 PERMISSION_DENIED 取得地理資訊失敗,因為此頁面沒有獲取地理位置信息的權限。
2 POSITION_UNAVAILABLE 取得地理資訊失敗,因為至少有一個地理位置信息內的資訊回傳了錯誤。
3 TIMEOUT 取得地理資訊超過時限,利用 PositionOptions.timeout i來定義取得地理資訊的時限。

語法

typeErr = poserr.code

規格

Specification Status Comment
Geolocation API
The definition of 'PositionError.code' in that specification.
Recommendation Initial definition

瀏覽器的相容性

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 5 3.5 (1.9.1) 9 10.60
No support 15.0
16.0
5
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? ? 4.0 (4) ? 10.60 ?

請參考

文件標籤與貢獻者

此頁面的貢獻者: alphan_chen, yachiehwu
最近更新: alphan_chen,