GeolocationCoordinates
Baseline
Widely available
*
This feature is well established and works across many devices and browser versions. Itâs been available across browsers since 2020å¹´7æ.
* Some parts of this feature may have varying levels of support.
å®å ¨ãªã³ã³ããã¹ãç¨: ãã®æ©è½ã¯ä¸é¨ã¾ãã¯ãã¹ã¦ã®å¯¾å¿ãã¦ãããã©ã¦ã¶ã¼ã«ããã¦ãå®å ¨ãªã³ã³ããã¹ã (HTTPS) ã§ã®ã¿å©ç¨ã§ãã¾ãã
GeolocationCoordinates ã¤ã³ã¿ã¼ãã§ã¤ã¹ã¯ãå°çä¸ã®ç«¯æ«ã®ä½ç½®ã¨é«åº¦ãããã³ãããã®ããããã£ãè¨ç®ããã精度ã表ãã¾ãã
å°çã®ä½ç½®æ
å ±æ
å ±ã¯ãä¸ç測å°ç³»åº§æ¨ (WGS84) ã§æå®ãããå½¢ã§æä¾ããã¾ãã
ã¤ã³ã¹ã¿ã³ã¹ããããã£
GeolocationCoordinates ã¤ã³ã¿ã¼ãã§ã¤ã¹ãç¶æ¿ããããããã£ã¯ããã¾ããã
GeolocationCoordinates.latitudeèªåå°ç¨-
ãã®ä½ç½®ã®ç·¯åº¦ã 10 鲿°ã®è§åº¦ã§è¡¨ã
doubleåã®å¤ãè¿ãã¾ãã GeolocationCoordinates.longitudeèªåå°ç¨-
ãã®ä½ç½®ã®çµåº¦ã 10 鲿°ã®è§åº¦ã§è¡¨ã
doubleåã®å¤ãè¿ãã¾ãã GeolocationCoordinates.altitudeèªåå°ç¨-
ãã®ä½ç½®ã®å¹³åæµ·æ°´é¢ããã®ç¸å¯¾çãªé«åº¦ãã¡ã¼ãã«åä½ã§è¡¨ã
doubleåã®å¤ãè¿ãã¾ããå®è£ ããã®ãã¼ã¿ãæä¾ã§ããªãå ´åããã®å¤ã¯nullã«ãªããã¨ãããã¾ãã GeolocationCoordinates.accuracyèªåå°ç¨-
latitudeããã³longitudeããããã£ã®ç²¾åº¦ãã¡ã¼ãã«åä½ã§è¡¨ããdoubleåã®å¤ãè¿ãã¾ãã GeolocationCoordinates.altitudeAccuracyèªåå°ç¨-
altitudeããããã£ã®ç²¾åº¦ãã¡ã¼ãã«åä½ã§è¡¨ããdoubleåã®å¤ãè¿ãã¾ãããã®ããããã£ã¯ãå®è£ ããã¼ã¿ãæä¾ãããã¨ãã§ããªãå ´åã¯nullã«ãªããã¨ãããã¾ãã GeolocationCoordinates.headingèªåå°ç¨-
端æ«ãåãã£ã¦ããæ¹åã表ã
doubleåã®å¤ãè¿ãã¾ãããã®å¤ã¯ã端æ«ã®åããçåããã©ãã ãé¢ãã¦ãããããè§åº¦ã§è¡¨ãã¾ãã0ã¯çåã表ããæ¹åã¯æè¨åãã«å®ãããã¾ã (ããªãã¡ãæ±ã¯90度ã西ã¯270度ã§ã)ãspeedã0ã®å ´åãã¾ãã¯ç«¯æ«ãheadingæ å ±ãæä¾ã§ããªãå ´åãheadingã¯nullã«ãªãã¾ãã GeolocationCoordinates.speedèªåå°ç¨-
端æ«ã®ç§»åé度ãã¡ã¼ãã«æ¯ç§ã§è¡¨ã
doubleåã®å¤ãè¿ãã¾ãããã®ããããã£ã¯nullã«ãªããã¨ãããã¾ãã
ã¤ã³ã¹ã¿ã³ã¹ã¡ã½ãã
GeolocationCoordinates ã¤ã³ã¿ã¼ãã§ã¤ã¹ãç¶æ¿ãã¦ããã¡ã½ããã¯ããã¾ããã
GeolocationCoordinates.toJSON()-
ãã®
GeolocationCoordinatesãªãã¸ã§ã¯ãã® JSON 表ç¾ãè¿ããJSON.stringify()ã§ã·ãªã¢ã©ã¤ãºãããã¨ãã§ããããã«ãã¾ãã
仿§æ¸
| Specification |
|---|
| Geolocation > # coordinates_interface > |